Click to See Complete Forum and Search --> : Obtaining the program name from a Window handle


hankejh
May 9th, 2001, 10:19 AM
Hi,
I'm curious whether the program name associated with an open window can be obtained from an ActiveX control built using VB5 or 6. I know I can use the GetWindowText function to collect the associated window title text - however, what I really want to know is the path to the program which created the window. For instance, if I were to double click on an Excel window, can I capture that WM_LBUTTONDBLCLK message and identify it was received by a Window created by c:\program files\office\excel.exe ??

Many thanks for any help!

D

Z LoveLife
May 9th, 2001, 11:34 AM
API isn't my thing.... yet but I remember stuff I read on the web pretty well.
try going here http://www.thescarms.com/vbasic/alttab.asp