Detect multiple run

BlitzPlus Forums/BlitzPlus Programming/Detect multiple run

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could do a 'FindWindow' on you own title bar. So you run, change your own app title to 'I am a Wombat' or something. Then do a FindWindow for 'WhizzyGame'. If you find it, then you are already running and will exit.

Otherwise, set your apptitle to 'WhizzyGame' and continue.

I think this is the FindWindowAPI call...

.lib "user32.dll"
 
FindWindow%( class$,Text$ ):"FindWindowA"