Link to home
Start Free TrialLog in
Avatar of jrmcg
jrmcg

asked on

Instance of another application

I know how to check the instance of the application that is running.
But how can you check the instance of another application that
might be running?  I have tried to use the Windows API call to
FindWindow(...,...) but I may be calling it wrong.  If someone could
point me in the right direction I would appreciate it.

Thanks -- jr
Avatar of anthonyc
anthonyc

FindWindow(0, "WindowCaptionHere")
Avatar of jrmcg

ASKER

I tried FindWindow(0,"CAPTION") already.  I think
my problem is in the declaration of the function.
Is there anything wrong with this?:::

Declare Function FindWindow Lib "User32" Alias
"FindWindowA" (ByVal lpClassName As String,
ByVal lpCaption As String) As Long

I tried without the alias and it wouldn't compile.
Maybe the return type is wrong?  I know the
Function returns an hWnd but the compiler
did not like that either.

Thanks -- jr
ASKER CERTIFIED SOLUTION
Avatar of peterwest
peterwest

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial