|
-
January 26th, 2000, 02:04 PM
#1
Need help !
Need to know how to keep a VB.exe from being open twice.
-
January 26th, 2000, 03:45 PM
#2
Re: Need help !
This should work:
Sub Main()
If App.PrevInstance then
End
End If
End Sub
If your project is set to start in Sub Main then the above will work without modification, but if your project is set to start in a form, then paste the if block at the very beginning of the Form_Load() procedure of the main form.
If you place that if statement as the first couple of lines of code that will be executed when the program starts up, it will ensure that if there is another version running, this one wont' start.
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
January 27th, 2000, 07:40 AM
#3
Re: Need help !
Thanks for the help! I 'll give it a try.
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|