![]() ![]() For information about creating MDI child windows that operate within the MDI parent form, see How to: Create MDI Child Forms. At this point, you have created an MDI parent window. The first menu will create and hide menu items at run time, and the second menu will keep track of the open MDI child windows. Also create a top-level menu item called &Window. Create a top-level menu item with the Text property set to &File with submenu items called &New and &Close. Additionally, be aware that the edge of the MDI parent form will pick up the system color (set in the Windows System Control Panel), rather than the back color you set using the xref.BackColor%2A?displayProperty=nameWithType property.įrom the Toolbox, drag a MenuStrip control to the form. The MenuStrip gives an easier approach to represent and group application commands. Rename the 'Form1' to 'FrmParent', which is the parent window, since we will be dealing with multiple forms. While setting properties in the Properties window, you can also set the WindowState property to Maximized, if you like, as it is easiest to manipulate MDI child windows when the parent form is maximized. Create a new project and give it the name 'DynamicMenuStripDBDriven'. From the Toolbox, drag a MenuStrip control to the form. This designates the form as an MDI container for child windows. In the Properties window for the form, set its IsMdiContainer property to true and its WindowsState property to Maximized. This designates the form as an MDI container for child windows. Create a new Windows Forms application project in Visual Studio. In the Properties window, set the xref.IsMdiContainer%2A property to true. Create an MDI parent form at design timeĬreate a Windows Application project in Visual Studio. Creating an MDI parent form is easy, both in the Windows Forms Designer and programmatically. This is the form that contains the MDI child windows, which are the sub-windows wherein the user interacts with the MDI application. The foundation of a Multiple-Document Interface (MDI) application is the MDI parent form. For information about creating a MDI parent Form by using a xref:, see How to: Create an MDI Window List with MenuStrip. The xref: control is retained for both backward compatibility and future use, if you choose. This topic uses the xref: control, which has been replaced by the xref: control. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |