A User Control's Parent Application?

decxx
08-21-2002, 02:19 PM
Hi,

how can an activex-control read-out the parent application's EXE-Name, Title, Path etc....

If i use the app.EXEName, app.path properties i always get the control's own properties not it's container app-object!?!?

Thinker
08-21-2002, 02:23 PM
I think UserControl.Parent is the starting object.

Mathimagics
08-21-2002, 02:42 PM
The Parent object might not be usable like an App object (I'm not 100% sure). If not, it might be easier to identify the application from the container's handle - UserControl.ContainerhWnd, then use the handle to get the exe pathname .... cf my ExePathFromWindow function at
http://www.vbforums.com/showthread.php?s=&threadid=186545

Dr Memory :cool:

Thinker
08-21-2002, 02:45 PM
The only problem with the Container property is it could be a
picturebox, frame, other activex control. The parent is the
form it is on, no matter what container it is in.

Mathimagics
08-21-2002, 02:53 PM
Oh, I thought that was true for a VB control, not an ActiveX control?

I was referring to ContainerHWnd, not Container.hWnd .....

Thinker
08-21-2002, 04:53 PM
Oh, ok. I thought you meant Container.hWnd. I think we are on
the same page now.

decxx
08-21-2002, 10:35 PM
ooohhh - sorry i didn't think it could be that easy...

if someones interested in the result... i will post a activex-control that turns you VB-Projects to Windows XP-Styled Forms and Controls without using external XML-Manifests!!!!

Contact me via email if interested!


THHHAAAANNNKKK YYOOOUUUU ALLLL!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum