Im assuming that you wish to close all instances of your program. Here is one other way you could do it.
It eliminates the use of GoTo and the FindWindow API.
'decalre the API like you already did
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As IntPtr, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Long) As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'declare a process array and fill it with each process that matches the name
Dim processes() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)
'loop through each returned process
For Each p As Process In processes
'send the close message to each window with the same process name
SendMessage(p.MainWindowHandle, &H10S, 0, 0)
Next
End Sub
:)