Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim mm As Long
Dim nn As Long
Dim bb As Long
Private Sub Command1_Click()
mm = FindWindow(vbNullString, "梦幻西游ONLINE")
bb = SetParent(mm, Form1.hwnd)
End Sub
Private Sub Form_Load()
nn = Shell("E:\网络游戏\梦幻西游\my.exe", vbNormalFocus)
End Sub