Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Fox Programs open...but
Message
 
 
To
12/06/2001 17:04:01
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00518551
Message ID:
00518621
Views:
12
Yes, this is Ed's code. Why did you comment it? Try to put set step on after declaration and see, what's the problem for this particular exe.
>This is the code that I am using, and all the title captions are different.
>
>*!*		DECLARE INTEGER CreateEvent IN WIN32API ;
>*!*			   INTEGER lpEventAttributes, ;
>*!*			   SHORT bManualReset, ;
>*!*			   SHORT bInitialState, ;
>*!*			   STRING @ lpName
>*!*		DECLARE INTEGER GetLastError IN Win32API
>*!*		DECLARE CloseHandle IN Win32API INTEGER hObject
>*!*		nEh = CreateEvent(0,0,1, PROGRAM(0) + '.EVENT')
>
>*!*		IF GetLastError() = 183 OR nEh = 0
>*!*			*-- This shows that office is currently running in the background.
>*!*			= MESSAGEBOX('This application is currently running!' + CHR(13) + "You can't open it more than once", 16, '')
>*!*			=CloseHandle(nEh)
>*!*			QUIT
>*!*		ENDIF
>*!*	ENDIF
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform