georgepatotk Posted August 22, 2004 Posted August 22, 2004 Dear, Can u please tell me on how to do this: I have a project and after distribute to the user side, i want to limit the user to only open the program once in a time. if the user click on the exe file, the system will check whether the program has been opened. if it is opened, the system will say "You are not allow to run two at once" Thanks in advance, I am looking for this solution urgently. please help. Quote George C.K. Low
Administrators PlausiblyDamp Posted August 22, 2004 Administrators Posted August 22, 2004 Put the following in either your Sub Main of the Form_Load event of your 1st Form Dim running As Boolean Dim mut As New System.Threading.Mutex(True, Application.ProductName, running) If running = False Then MessageBox.Show("Already running") Me.Close() End If should work fine Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
georgepatotk Posted August 22, 2004 Author Posted August 22, 2004 Thanks for the solution. Quote George C.K. Low
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.