Visual Basic windowsstate minimized box

    General discussion

  • Gud day!

           I have a project that has a custom form (image). I had set the first form (form1) as mdiparent. Because i have a custom form,


           form2.mdiparent = mdiparent  (is not working since when i click the mdiparent(form1) the form2 will go to the back of form1 which is the          mdiparent)

        So, i use "form2.showdialog" and  now i saw my form inside the mdiparent and it is great.  The problem  is i  created a minimized button for every form and everytime i minimized the form (form2), the form will minimized on the system tray which is not what i wanted to be. I want the form2 will minimized only on my "mdiparent form" not on the system tray. It is possible to add a "panel" or a "picturebox, statusstripmenu" on my mdiparent so that when i minimized the form2 and so on this "panel, picturebox"  hold the "minimized form"? Are there any alternative to do this? pls help.

    Sunday, January 08, 2012 4:22 PM

All replies

  • Duplicate the ShowNewForm event code in the MDI form Load event using new Form2 instead of new Form.  You want Form2 to be a MDIChild of Form1.  Basically, don't use the VB autoinstantiation.  Make a New Form2 and set its Parent to Form1.
    Sunday, January 08, 2012 4:58 PM
  • Hi JohnWein i am confused..can you give me some example. tnx

    Monday, January 09, 2012 4:28 AM
  • The code in the ShowNewForm event of your MDI form is the example code.
    Monday, January 09, 2012 4:48 AM