简体   繁体   中英

How can I start a process as a child of a winform in my C# program?

I have a process that was written by WPF and I want to start it in my program. I used "process.start()" and its worked successfully. But now I want to start my process as a child of a form.

Do you mean you have a usercontrol/form, and you want to display that in your application?

If so, see this link: http://www.switchonthecode.com/tutorials/wpf-tutorial-using-wpf-in-winforms

You can't start process as a child of a Form. Process is just another application that is running on the computer no matter if it was build in windows forms or wpf or even assembly language.

You may mean starting new form as a child from main form?

using (ChildForm form = new ChildForm())
     form.ShowDialog(this); // this refers to main form object

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM