Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application running more than once
Message
 
À
19/08/2005 15:15:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01042387
Message ID:
01042391
Vues:
15
Something like this:
* Prevent running the second instance
lcWindowTitle="EXE Window Title goes here...."

IF NOT EMPTY(lcWindowTitle)
	DECLARE INTEGER FindWindow IN Win32API;
		  STRING @lpClassName, STRING @lpWindowName

	Declare Long ShowWindow in User32.dll;
		Integer hWnd, Integer nCmdShow
	

	LOCAL lhWnd 
	lhWnd= FindWindow(0, @lcWindowTitle)

	if lhWnd#0
		= ShowWindow(lhWnd, 9)	&& SW_SHOW=9
......
>I dont want having more than one of the same application running in a computer. What code can I use in order for me to acomplish that???
>
>
>The thing is that when I make a program in Visual Fox pro, I build the executable and install a short cut in my desktop. When I open the shortcut, It opens the program, and runs it. But if i open it again, without closing the first one, it opens another window with the same program. If anyone has any code in order that when I already have the program running, when i try to open it again withouth closing the first one I opened, it doesnt let have Two programs of the same kind????????
>
>
>plz help
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform