Clicking Command2 does not destroy the App. Is myWnd not a valid handle?
Code:
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim myWnd
'
'
Private Sub Command1()
Dim Path As String
Path = App.Path & "\Client.exe"
Shell Chr(34) & Path & Chr(34), vbNormalFocus
myWnd = FindWindow("ThunderRT6FormDC", "Form1")
End Sub
Private Sub Command2_Click()
DestroyWindow myWnd
End Sub