#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    12

    How can I make a new form visible?


    I created a new project (VC++ .net) "Windows Forms...(.net)".

    How can I show a new Form when the user clicks on a button?
  2. #2
  3. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12
    You can use ShowWindow() to make a form visible or not visible. If you want to make a form visible when a button is clicked, you should load the form at runtime (all the forms at once, so the user doesnt need to wait for it to load), and then make them all invisible except for the one you want (the main one I guess) and use ShowWindow when the button is pressed.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    12
    But what must I #include that the button form the one Form knows that there is another Form ("main-Form" is able to show the "second-Form")?

IMN logo majestic logo threadwatch logo seochat tools logo