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
Private Sub Command1_Click()
Dim hw As Long
Shell "notepad.exe", vbNormalNoFocus
hw = FindWindow(vbNullString, "无标题 - 记事本")
If hw Then SetParent hw, Me.hWnd
End Sub
以上代码是运行记事本软件,然后将其窗口放到本窗口内,你自己修改一下就行了,另外还可以用API函数改变该软件窗口的位置和大小等等,这也很简单的。
温馨提示:答案为网友推荐,仅供参考