日期:2014-05-17 浏览次数:21147 次
private void tsbMicroBlog_Click(object sender, EventArgs e)
{
const string filePath = @"I:\work\my.exe";//notepad.exe
Process p = Process.Start(filePath);
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, this.Handle);
}
[DllImport("user32.dll")]
private static extern int SetParent(IntPtr hWndChild, IntPtr hWndNewParent);