Home > Net >  How to set the click on a menu bar and then jump to a new window
How to set the click on a menu bar and then jump to a new window

Time:11-16

There is a main form, I want to click the menu bar is set to a can then turned to the new window, how should do?

CodePudding user response:

 
Private void ShowNewForm (object sender, EventArgs e)
{
Form1 childForm=new _click ();
ChildForm. MdiParent=this;
ChildForm. The Show ();
}

Writing them, you try again

CodePudding user response:

reference 1st floor wilson1966 response:
 
Private void ShowNewForm (object sender, EventArgs e)
{
Form1 childForm=new _click ();
ChildForm. MdiParent=this;
ChildForm. The Show ();
}

Writing them, you try again


Error:
"System. ArgumentException" type of untreated anomalies in the System. Windows. Forms. DLL in
Other information: is specified for this form of MdiParent form not MdiContainer

CodePudding user response:

Form2 f=new Form2 ();
F.S how ();

CodePudding user response:

Click on the menu bar of a - in the calling function, and write
Form2 f=new Form2 ();
F.S howDialog ();
You is oneself has designed this from2
  •  Tags:  
  • C#
  • Related