>when starting our application, we use the findwindow api call to determine if the application is already running and if a handle is found, we use setforegroundwindow to focus on that window rather than starting another copy of the application. Our problem is that since the application name matches the folder name in which the executables are stored, we cannot start the application from windows explorer because the window name for windows explorer is the folder name. we are trying to determine what api functions we can use to determing the application that an open window is associated with. if anyone can help, we would appreciate it.
Provide the 'class' parameter of FindWindow. Also yo could use GetClassName to get class from hwnd :
cClass =space(200)
lnBufLen = GetClassName(iHWND, @cClass, 200)
IF UPPER(LEFT(cClass,lnBufLen))='VFP'
...
Cetin