Multiple forms:
1. Which is the main form
Problem: The main form is hidden, after closing other forms, the main form is not displayed/closed, then the program is closed
(1), the value of the constructor, the form is passed to another form
2. The form can only open one
Creates a global generic collection in order to place all open forms
(1), before the form opens, determine whether there is a name consistent form in the collection, if there is a description is open, do not open the
Issue: When the form is open and closed, it cannot be opened again
Workaround: Clears this form object record from the collection in Form1 when the form is closed
Issue: When the form is already open, clicking the Open button again will not re-display the open form and focus into
Workaround: Locate the Open object, set the WindowState property to: Find the object for the open form, and use the focus method;
3. Transfer values and controls between forms
Pass value: Constructor pass value
Control: The first step, locate the Form object, and the second step, change the control value of the Form object Note: To modify the access rights of objects in the form
4. The form of the prompt box type
ShowDialog ();
Role:
Menus and toolbars:
1, MenuStrip: Top menu Split Line: 1,-2, right-click Insert Split ...
Shortcut keys: The bottom of the right-click property for each item you can set the shortcut key to work regardless of whether the option is hidden or the menu is hidden
2. ContextMenuStrip: Right-click menu
3. Statusstript: Bottom Menu
4. ToolStrip Tool Bar
5, ToolStripContainer tool strip container
C # Multiple forms and Menu toolbars