Visual Basic has a function
called 'PrevInstance'. If the same
program is started twice, this Boolean
will have the value 'True'. If the
program has only been started once, this
Boolean will have the value 'False'. If
you want your program to end, if the same
program has already been loaded, just add
this line to your program:
Private
Sub Form_Load()
If App.PrevInstance Then End
End Sub
|