johnnyplang
Programmer
I have an application that opens in VB but when then action is triggered again another instance of the program opens instead of maximizing the first instance. I tried the below but that doesn't work.
hwnd = FindWindow(vbNullString, "program X")
If hwnd <> 0 Then
AppActivate "program X"
Else
Shell ("c:\Program X.exe")
End If
hwnd = FindWindow(vbNullString, "program X")
If hwnd <> 0 Then
AppActivate "program X"
Else
Shell ("c:\Program X.exe")
End If