Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to open third party exe file into windows form
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Pankil Bhatt
7y
251
1
Reply
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);
}
Right now I am opening this notepad.exe in panel view but it will not open inside in form it will open in outside the form.
Please let me know how to do this.
Thanks in advance.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Currency convert into words format (up to Hundred Billion. )
Filter int32 filed in RadGridView according to textbox