Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Check for multiple instances of a program 1998-02-07 -- Steven Gallafent You need to make three additions under global embeds:
At "Inside the Global Map" add:
MODULE('WINAPI')
FindWindow(<*CSTRING>,*CSTRING),UNSIGNED,PASCAL,RAW,
NAME('FindWindowA')
SetForegroundWindow(UNSIGNED),SIGNED,PASCAL
END
At "Global Data" add:
FindWindowName CSTRING(50)
FindWindowHandle UNSIGNED
At "Program Setup" add:
FindWindowName = 'Peoples Favorite Colors'
FindWindowHandle = FindWindow(,FindWindowName)
IF FindWindowHandle
SetForegroundWindow(FindWindowHandle)
DctKill !Omit these two lines if not using ABC templates
GlobalErrors.Kill !Omit these two lines if not using ABC templates
RETURN
END
Today is November 21, 2024, 7:55 am This article has been viewed 35277 times.
|
|