One form open at a time and close others

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • godhulirbalaka
    New Member
    • Oct 2007
    • 26

    One form open at a time and close others

    Dear Sir/Madam,

    I am new vb 6.0 user. I am developing Shop Management Program. I have a main form with buttons and menus. when i click any button then respective form is open. I want to set a command by which when i click a button then respective form will open and when i click another button then previous opened form will close and new form will open. that means at a time only one form will active with the main form. Please note that i dont used any midi or child form. All are general form including main form also. Please help me godhulirbalaka@ yahoo.com

    I have Shown All the Forms in modal :
    Form1.Show 1
    This ensures, till you close the Current Form, Next Form / MDI Form cannot be opened

    Another thing is if i click another button for another form without closing previous one then automatically close the previous one and open new one. Is it posible?
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Show All the Forms in modal :

    Form1.Show 1

    This ensures, till you close the Current Form, Next Form / MDI Form cannot be opened

    Regards
    Veena

    Comment

    • godhulirbalaka
      New Member
      • Oct 2007
      • 26

      #3
      Originally posted by QVeen72
      Hi,

      Show All the Forms in modal :

      Form1.Show 1

      This ensures, till you close the Current Form, Next Form / MDI Form cannot be opened

      Regards
      Veena

      Yes sir i have done this. Another thing is if i click another button for another form without closing previous one then automatically close the previous one and open new one. Is it posible?

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        HI,

        When you are showing the Form Modally, you cannot Open another Form Unless, you close the Current Form..

        Regards
        Veena

        Comment

        Working...