Results 1 to 5 of 5

Thread: how to specify the first form to load?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Hong Kong
    Posts
    62
    Hi,

    I've got several forms in a project, How can I specify which one to load first? or their load order? thanks a lot.

    Andy Cheung
    Please Visit My WebCam!!
    http://www.hmcheung.com

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    You can set the First Form that Loads by specifying it as the Startup Object in the Project Properties.

    The Order in which other Forms are loaded is determined by you when you load them, i.e.
    Code:
    Form2.Show
    
    or
    
    Load Form2

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Hong Kong
    Posts
    62

    Thumbs up

    Oh thanks.
    How about if i've got several forms opened and I want to close all of them in one click? i.e. quit the programme?
    coz I have to close each form before I can quit my programme. I've tried to use unload form2 and form2.hide but it doesn't seem to solve the problem.
    Thanks!

    Andy Cheung
    Please Visit My WebCam!!
    http://www.hmcheung.com

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    For each item in forms
    unload item
    next item
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    If you have many forms in your program you should consider using a MDI (multiple document interface) form to hold it all together - like when Word has many documents open at once. That way you make each other form a MDI CHILD and when you close the MDI form all the child forms close as well.
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width