Thread: Visual Basic Problem (plz Help!)

  1. #1
    Registered User
    Join Date
    Oct 2001

    Red face Visual Basic Problem (plz Help!)

    I developed a small program that creates Forms at Run time. for example: I have added a form(frmMain) at Design time; when I want to create a new form at Run time, I just create an instance of the frmMain and show the new form. I used Code: dim frmMain as new frmMain.

    But now I want to use buttons to show one of the forms. for example: I have created 3 forms at Runtime and Captioned: Form1, Form2, Form3 respectively. My Problem is: I want to Click one a Button that is captioned "Show Form1" to show the Form2. for clicking the Button "Show Form1", it will show the Form1. How will I do that? Plz Help!

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Newport, South Wales, UK


    Ditch VB and maybe we'll talk. I don't recall this being a Visual Basic forum...

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Just create the forms you need, add buttons to your main form...and when each button is clicked, call Show on the form you wish to activate

    See attached

  4. #4
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    There's a frm2.Visible state. Just set that to true...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. visual basic not working?
    By BobMcGee123 in forum A Brief History of
    Replies: 6
    Last Post: 01-16-2007, 07:37 AM
  2. visual basic vs C or C++
    By FOOTOO in forum Windows Programming
    Replies: 5
    Last Post: 02-06-2005, 08:41 PM
  3. Visual Basic vs. Visual C++
    By Tesita in forum Windows Programming
    Replies: 7
    Last Post: 01-07-2002, 03:02 PM
  4. Visual Basic
    By nsk in forum C++ Programming
    Replies: 1
    Last Post: 11-23-2001, 07:36 PM