-
Is there a way to have it so 2 copies of your program are running at the same time. Like for instance someone opens yourporgram bydouble clicking on the exe then decides to double click on it again. 2 are going to run now. I thought about what if when I start the prog to write to the registry and say its running then when it gets shut down then write again to the registry and say its not running. But the porblem with this is if something crashes and the computer has to be shut down before that line of code runs then he can never use my prog again. Does anyone know how to do this? I hope I explained it well. Thanks!!
-
Code:
If App.PrevInstance = True Then
MsgBox("The program is already running!")
End
End If
source = http://www.vb-world.net/tips/tip25.html
-
if you want to see if another version of your program is running, checkt the App.PrevInstance property:
Code:
If App.PrevInstance Then
MsgBox "Another version is running"
End
End If
-
sorry, dimava, your post didn't show up when i posted.
-
yea, it happens to me all the time
-
Hey thanks guy!!!! I apretiate your help!
-
Code:
'DON'T USE END!
'Use Unload <FORMNAME!>
Unload Form2
Unlod Me
etc...