111,093
社区成员




[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int MoveWindow(IntPtr hWnd, int x, int y, int nWidth, int nHeight, bool BRePaint);
MoveWindow函数。
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetParent")]
public extern static IntPtr SetParent(IntPtr childPtr, IntPtr parentPtr);
private void Form1_Load(object sender, EventArgs e)
{
Process p = Process.Start(@"D:\Program Files (x86)\Notepad++\notepad++.exe");
p.WaitForInputIdle();
Thread.Sleep(3000);
SetParent(p.MainWindowHandle, panel1.Handle);//Panel
}