te notepad.Exe
Pid = Shell("c:\windows\notepad.exe",
vbNormalFocus)
If Pid = 0 Then MsgBox "Error starting the app"
''retrieve the handle of the window
mWnd = InstanceToWnd(Pid)
''Set the notepad''s parent
SetParent mWnd, Me.hwnd
''Put the focus on notepad
Putfocus mWnd
''Unlock windowupdate
LockWindowUpdate False
End Sub
Private Sub Form_Unload(Cancel As Integer)
''Unload notepad
DestroyWindow mWnd
''End this program
TerminateProcess GetCurrentProcess, 0
End Sub