DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005

    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).

  2. #2
    Join Date
    Dec 2004

    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,

    Kerry Moorman

  3. #3
    Join Date
    Nov 2005
    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?

  4. #4
    Join Date
    Nov 2003
    Alameda, CA
    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."

Similar Threads

  1. Replies: 4
    Last Post: 06-04-2009, 04:52 PM
  2. VB.NET Mdi project problem
    By H.w.Hendrick in forum .NET
    Replies: 0
    Last Post: 10-10-2005, 02:16 PM
  3. Replies: 2
    Last Post: 09-10-2005, 02:56 AM
  4. Best of both worlds or designing for bugs ?
    By Bill McCarthy in forum .NET
    Replies: 4
    Last Post: 04-13-2001, 04:45 PM
  5. Technical issues with VB.NET
    By Patrick Ireland in forum .NET
    Replies: 11
    Last Post: 01-30-2001, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center