How to embed (dock) Third party EXE into Panel/form in C# .net

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I need to write application in which I can embed (Dock) third party exe into panel witch I done partially with following code-<br/>
<br/>
[DllImport("user32.dll", SetLastError = true)]<br/>
public static extern uint SetParent(IntPtr hWndChild, IntPtr hWndNewParent);<br/>
<br/>
private void button1_Click(object sender, EventArgs e)<br/>
{<br/>
System.Diagnostics.Process.Start("notepad");<br/>
System.Diagnostics.Process P = <br/>
System.Diagnostics.Process.GetProcessesByName("notepad")[0];<br/>
P.WaitForInputIdle();<br/>
SetParent(P.MainWindowHandle, this.panel1.Handle);<br/>
}<br/>
<br/>
Problem-<br/>
1) with this we can run third party exe into panel but not able to dock or feet it to panel<br/>
<br/>
2) can we embed all dialog generated by this process into panel<br/>
<br/>
Thanks in advance

View the full article
 
Back
Top