嵌套外部程序到窗口,在窗口设计器里预览能正常执行但重启程序用并列窗口运行按钮提示button1 代码SetParent(FindWindow(Nothing, "chrome"), e.Form.BaseForm.Handle.ToInt32())Dim proc As New Process
proc.File = "C:\Program Files\Google\Chrome\Application\chrome.exe"
proc.Start
System.Threading.Thread.Sleep(1500)
'然后根据标题嵌入
Dim hwnd As IntPtr = FindWindow(Nothing, "新标签页 - Google Chrome")
SetParent(hwnd, e.Form.controls("panel1").basecontrol.Handle.ToInt32())
MoveWindow(hwnd, 100, 100, 200, 300, True)
是什么原因造成的?