General information
Category:
Windows API functions
>Is ther anyone out ther ewho can tell me how to prevent an app from starting twice (By users). A neat way please using temp tables and so on i know but there must be a easier way.
Here is a code snippet I used for my app.:
*** Change this programs running screen name to something different
*** than the window name you are looking for
MODIFY WINDOW screen TITLE "WINCALC 96"
*
*** Run Program to see if Program is already running,
*** If it is Maximize the first program and shut down this one
*
SET LIBRARY TO "LIBS\foxtools.fll" additive
GetWind = RegFn("FindWindow","CC","I")
func_ref = RegFn("PostMessage", "IIIL", "I")
wclass = 0
*** This is the apps window name to look for
winname = "WINCALC 96 Ver 1.1"
apphand = CallFn(GetWind, wclass, winname)
*** if the app was found, Maxizime that session and wuit this one.
IF apphand <> 0
=CallFn(func_ref, Apphand, 274, 61488, 0)
QUIT
ENDIF
SET LIBRARY TO
*** Set window title back
MODIFY WINDOW screen TITLE "WINCALC 96 Ver 1,1"
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only