Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems With ActiveX

Status
Not open for further replies.

IanAble

Programmer
Jan 24, 2005
112
GB
Hi all. I'm using the hWnd property of a FlexGrid control to get the Client Rect of the control.

Write code referring to FlexGrid.hWnd in the form module and the property is non-zero. However, Control.hWnd or FlexGrid.hWnd are zero in a custom class (a wrapper object referenced in the same form). Even more bizarrely, FlexGrid.hWnd is non-zero in the custom class if you refer to it in the form module first.

Any ideas how to get round this?
 
Ah, I Failed the idiot test and created the instance of the class in the Form_Open Event. Doing the same in Form_Load solved the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top