- I want to run an exe file on my winform .net application within the panel using c# code
- I’m able to run exe file on the button click with
System.Diagnostics.ProcessStartInfoandProcess p = Process.Start("notepad.exe");but what is the code to run this notepad file or any other exe file within the panel using c# code? -
I want to run the application within the panel not on the separate window.i had run the following code but the exe does not stay on the screen nor it opens within the panel
please tell me the solution for this.Process p = Process.Start("notepad.exe"); Thread.Sleep (600); // Allow the process to open it's window SetParent(p.MainWindowHandle, panel1.Handle); [DllImport("user32.dll")] static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
I want to run an exe file on my winform .net application within the
Share
I think what you are talking about is embedding an application in your panel.
This is only possibly with executables that have been created to be embedded. Notepad is not one of those. Some browsers can be – Mozilla is one example, and IE is another.