Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop 2 exe files from running and to disable windows syst keys?

Status
Not open for further replies.

Ashbel

Programmer
Jan 20, 2011
7
ZW
Im having trouble stopping 2 instances of the same prog from running, i get an error on this statement
FindWindowHandle = FindWindow(,FindWindowName)

i also need help disabling windows start button and Cntrl-alt del from my app,
please help

 
Hi!

If you are using Clarion 6.2 or higher, check out the BeginUnique() function in cwutil.inc.

From the Help ::

Code:
BeginUnique (Set Application to Run in a Single Process)
 

BeginUnique( applicationname )

 

BeginUnique
 Sets an application to run as a single process
 
applicationname
 A string constant or variable that specifies name of your application. Example: ‘INVOICE.EXE’
 

BeginUnique returns FALSE if the program specified in applicationname is already running (active). If not running, BeginUnique returns an event number specified by Windows. This event number can be used by the EndUnique statement to terminate the single process mode.

To add this function to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:

INCLUDE('CWUTIL.INC'),ONCE

Return Data Type:     LONG

Example:

IF NOT BeginUnique(GLO:ApplicationName)

 MESSAGE(CLIP(GLO:ApplicationName) & ' already running.')

 RETURN

ELSE

 RUN(GLO:ApplicationName)

END

 

See Also:

EndUnique

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top