Hello all,
I need to open third party .exe file inside windows form. I am using this code but it will open another new windows outside the form.
- [DllImport("user32.dll")]
- static extern IntPtr setParent(IntPtr hwc, IntPtr hwp);
- private void panel1_Paint(object sender, PaintEventArgs e)
- {
- Process p = Process.Start("notepad.exe");
- Thread.Sleep(5000);
- p.WaitForInputIdle();
- setParent(p.MainWindowHandle, this.Handle);
- }
Please let me know how to do this.
Thanks in advance.

Nitin SontakkePosted Jan 18, 2017, 11:00 PM