Results 1 to 3 of 3

Thread: [RESOLVED] Closing Form and Reopening

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Resolved [RESOLVED] Closing Form and Reopening

    I am a noob to visual basic and I was just wondering if there is a way that you can close a form and reopen it. The reason is because I have created a tic tac toe game, but at the end I want them to be able to play again. The problem is that if I want them to start over I would have to set alot of stuff back to 0 and or change the buttons on the screen etc. Is there a simple way to just close the form and have it reopen? Any suggestions are welcomed.

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Closing Form and Reopening

    Is this the only form in your project? If so then you are basically restarting the entire application yes? So you could just use Application.Restart().

    However if it is actually the form that you want to restart (because you have more than one form) then just call the Close method of the form and then have one of your other forms re-open it... although I'm sure there's a better way.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: Closing Form and Reopening

    Thanks that worked.

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