MDI Form in VB.Net
In a Multiple Document Interface (MDI) program, the user has the ability to view and interact with multiple child windows simultaneously within the main application window. This stands in contrast to single document interface (SDI) applications, which restrict users to working with only one document or file at a time.
The MDI paradigm, as exemplified by applications like the Visual Studio Environment, offers a versatile and efficient approach for managing and organizing complex workflows. It allows users to seamlessly switch between different documents or views, facilitating multitasking and enhancing productivity.
In comparison, SDI applications, such as Notepad, limit users to working with a single document at any given time. Opening a new document within an SDI application typically results in the closure of any previously opened document. This straightforward approach simplifies the user interface and ensures a focused interaction with individual documents.
IsMdiContainer Property
In VB.Net, any window can be transformed into an MDI parent by setting the IsMdiContainer property to True. By designating a window as an MDI container, you enable it to serve as a host for multiple child windows. This property assignment allows for the creation of a hierarchical structure, where the main window acts as the parent container, and the child windows are nested within it.
The following vb.net program shows a MDI form with two child forms. Create a new VB.Net project, then you will get a default form Form1 . Then add two mnore forms in the project (Form2 , Form 3) . Create a Menu on your form and call these two forms on menu click event. Click the following link to see how to create a Menu on your form How to Menu Control VB.Net.
NOTE: If you want the MDI parent to auto-size the child form you can code like this.
Conclusion
By exploring the MDI concept and appropriately configuring the IsMdiContainer property, you can create a sophisticated and efficient user interface that empowers users to work with multiple documents or views concurrently, developing a seamless and productive environment within your VB.Net application.
- Visual Studio IDE
- How to Create a VB.Net Windows Forms Application
- Label Control | VB.Net
- VB.Net Button Control
- VB.Net TextBox Control
- VB.Net ComboBox Control
- VB.Net ListBox Control
- VB.Net Checked ListBox Control
- VB.Net RadioButton Control
- VB.Net CheckBox Control
- VB.Net PictureBox Control
- VB.Net ProgressBar Control
- VB.Net ScrollBars Control
- VB.Net DateTimePicker Control
- VB.Net Treeview Control
- VB.Net ListView Control
- VB.Net Menu Control
- VB.Net Color Dialog Box
- VB.Net Font Dialog Box
- VB.Net OpenFile Dialog Box
- VB.Net Print Dialog Box
- KeyPress event in VB.NET
- How to create Dynamic Controls in VB.NET ?
- How do i keep a form on top of others
- Timer Control - VB.Net