VB.NET MDI issues
Hello, I'm trying to create a POS application using VB.NET. I wanted to create an outer main form window that has the menu, toolbar, and status bar be the parent MDI. Also I wanted to have MDI child forms that handle the dirty work, customers, inventory, receipts, etc. The only issue I have is that I want the clients to work on one screen at a time, so I don't want the clients to be able to minimize, close or move the child forms. I thought I could just make ControlBox = false, and all the other movable options set to false and start the child window maximized and it won't show the control box in the title window, but that wasn't the case. I was wondering if maybe there is an alternative to MDI or if I'm on the right path with using MDI with a single parent and single child but I'm setting the wrong options. Any suggestions would be much appreciated. As you can probably tell, I'm new to VB.NET but I have programmed in the past using C/C++ (just not GUI programming).
MDI may not be the best choice for you, since you don't really want Multiple Documents (or forms).
You might consider using a main form with buttons for Customers, Inventory, Receipts, etc. Each button could launch a modal form that would have to be closed by the user before another form could be launched.
For example, in the Customers button on the main form:
Dim frm as New frmCustomer
Just a thought,
How would I get the modal form to stay within the bounds of the parent form? Would I need to dynamically set the min and max size of the modal form to the parent forms size? Or is there an easier way?
I would use a standard form, and instead of building the logic in other forms I would use UserControls. Just cut all components in your already created mdichild forms, and paste them (with their code) into new UserControls. Anchor all UserControls so they will fit the main forms (leaving menu and status bar) Then you can load/show/hide them like you are doing with the standard form. You can load all of them at design time, or at runtime whenever they are needed.
It is a much neater solution (and runs much faster than an MDI)
"There are two ways to write error-free programs. Only the third one works."
By Phil Weber in forum .NET
Last Post: 06-04-2009, 04:52 PM
By H.w.Hendrick in forum .NET
Last Post: 10-10-2005, 02:16 PM
Last Post: 09-10-2005, 02:56 AM
By Bill McCarthy in forum .NET
Last Post: 04-13-2001, 04:45 PM
By Patrick Ireland in forum .NET
Last Post: 01-30-2001, 01:02 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center