Tuesday, November 16, 2010

How to write one project exe open at the time same project exe cant open another time in vb.net?

example: SampleProject.exe open and working at the time same system without close sampleproject.exe. cant open sampleproject.exe.

now my exe open each time please help. only one time open exe.How to write one project exe open at the time same project exe cant open another time in vb.net?
One idea is to store a value in the Registry that tells your program if another instance of the program is running. In other words, you would use a key like ';IsRunning'; and set it to True (using SaveSetting) while your program is running, and set it to False when the program terminates. Have the program use GetSetting when it starts, and if IsRunning is True, pop up a message box to tell the user that another instance is running and then exit.

No comments:

Post a Comment