hmm, for vb6 it can be done very simply using "App.PrevInstance".
Code:
Private Form_Load( )
If App.PrevInstance Then
Unload Me
End If
End Sub
for vb.net it's a bit different, but this function should work
Code:
Function PrevInstance() As Boolean
If Ubound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess).ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function
There is also a similar way to do it in vb.net here
http://www.thescarms.com/dotNet/SingleInstance.asp