Results 1 to 5 of 5

Thread: Close form and open another?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Close form and open another?

    This sounds pretty simple, but I am having a time with it. Can someone please give me an example?

    Thanks!

  2. #2
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    Code:
    Form2 myNewForm = new Form2();
    myNewForm.Show();
    this.Hide();
    //this.Close();
    If your first Form is your mainForm you should only hide it, since closing it will stop your application.

    Hope that helps,

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830
    Hiding it works, but when I close the other form, the splash form stay open in the background. How do I close everything?

    Thanks!

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    try this link ( i posted under my other id Csharp on it ) , it describes using a login form , but the idea is the same for a splash form ... Link
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830
    Thanks...

    I used:

    Application.Exit();

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