[System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "SetParent")] public static extern System.IntPtr SetParent( System.IntPtr hWndChild, System.IntPtr hWndNewParent); 第一个参数是你要显示的窗体的句柄,第二参数你设为Panel的句柄
用FindWindowEx获取启动的程序主窗体句柄,然后用SetParent将其父设为Panel
110,571
社区成员
642,568
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧