Ya it is the right way to do it. When you try to launch the second instance of the applicaiton it will check for a previous existance and if one exists it will bring it to the foreground
here is the code:
VB Code:
Declare Function FindWindow Lib "coredll.dll" (ByVal className As Char(), ByVal WindowsName As Char()) As Integer
Declare Function SetForegroundWindow Lib "coredll.dll" (ByVal hwnd As Integer) As Boolean
Public Shared Sub Main()
Dim hWnd As Integer
hWnd = FindWindow(Nothing, "Form1 Caption".ToCharArray)
If hWnd <> 0 Then
SetForegroundWindow(hWnd)
Else
Application.Run(New Form1)
End If
End Sub
Form1 Caption is the text on the top of the form in the title bar
Rgds
Barry