instance checking
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
i'm checking the existence of previous instance of my app using following code If App.PrevInstance Then MsgBox "An Instance Of The Application Is Already Running!", vbCritical, "Already Running" SetForegroundWindow End End If it is working alright but i was pondering over 2 scenarios 1) if i use unload me instead of End then the msgbox comes as if it is in an infinite loop (keeps popping up when i press OK) 2) if a prev instance is running, i want the running application to get on top of all windows. i know i've to use SetForegroundWindow, but i've no clue waht to pass in the parameter any help will be appreciated thanx in adv