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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a usercontrol's Handle

Status
Not open for further replies.

caguila

MIS
Mar 20, 2002
28
0
0
GB
I am using a dll within the usercontrol's project and need to pass the usercontrol as a paramenter (object). I am getting an error - Invalid use of base class name. Any ideas?

A bit more background: the dll creates a menu dynamically & I need to create a menu when clicking on the usercontrol.

If I define a variabla as an object and set the usercontrol as to the variable, the dll accepts it - eg

dim ctrlObject as object
set ctrlobject=me

call xdll(ctrlobject,"test")

within the xdll, the object's handle is used -ie ctrlobject.hwnd, but then the "error object does not support this property or method" is generated, bottomline is, how do I get the usercontrol's hwnd?




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top