This is easy if you launch the external process myprocess.exe from Shell function.
See the following code. Place a command button on the form and run the following code.
___
[tt]
Option Explicit
Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Const PROCESS_TERMINATE As Long = &H1&
Dim idProcess As Long
Private Sub Command1_Click()
On Error Resume Next
AppActivate idProcess
If Err Then idProcess = Shell("calc.exe", vbNormalFocus)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim hProcess As Long
hProcess = OpenProcess(PROCESS_TERMINATE, 0, idProcess)
TerminateProcess hProcess, 0
CloseHandle hProcess
End Sub[/tt]
___
Clicking the button will start Calculator application. If you close your program, Calculator will also close if it is running.