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

Retrieve name of calling EXE

Status
Not open for further replies.

MickTheBelgian

Programmer
Jan 11, 2001
160
DK
I am programming a OCX myself.
How can I find out the name of the EXE which is calling it?
If this is impossible, then any other info about the exe...
 
Try looking at the Parent object, maybe something like:

Parent.Name

or

Parent.Title
 
AHA!!!
I'm afraid it is not that easy!
The .parent and .extender.parent connection largely get lost when you are compiling into an OCX.
There are some API calls for finding out who calls the DLL but then you end up with MSVB60.DLL, who is the master of all things as far as VB is concerned. I worked out an extremely complicated solution using hwnd and then finding out which window is parent to it, but it is far from perfect. If anybody has a better idea...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top