My Main Project Is Under WPF, In My Solution I have:
I want to do this job: if button clicked, I show the Form1 in MainWindow Exactly Like MDI
Thanks for helping me in this case,your answers really help me but i found my aim : i just wanted to use windows form (form1) in to wpf windows (not my windows form controls ) in my form code,i just change the inheritance of form1 to Usercontrol instead of Form like this
public partial class Form1: UserControl
{
/// my code ...
}
therefor i can use this usercontrol in my windosformshost because my form is usercontrol now(nice job) but i got another problem , my controls didn't have visual sytle , cause of that i search in msdn , i got the answer from this link visual_Problem and the answer was in enable_visual i mean , before the winformshot host my windows form(ofcource my usercontrol) i should write this code :
System.Windows.Forms.Application.EnableVisualStyles();
Thanks for your comments. Best Regards, Hothreeyn.