Results 1 to 6 of 6

Thread: Show Form

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Show Form

    I have Form1 and Form2 and C#.
    How can I show the Form2

  2. #2

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Form2 myForm = new Form2();
    myForm.ShowDialog();

    Nobody likes null pointer exceptions.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    I have done the following from Form1

    Form2 myForm = new Form2();
    myForm.Show();

    but if I close the initial form that I called this from then the Form2 also is close.

    How can I close the calling form, without newly opened form from also closing?

  5. #5
    Lively Member
    Join Date
    Nov 2002
    Location
    Hong Kong
    Posts
    83
    Instead of closing Form1,

    Form1.Visible = false;

  6. #6
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    That still means its in memory and running in the background.

    What if a user clicks the X button in the top right, it will still close.

    Any better ways to do this.

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