C # this. Hide ()
The first time you use it is in the _load function:
Booksystem bs = new Booksystem ();
Bs. ShowDialog ();
This. Hide ();
The second time when landing successful:
Booksystem bs = new Booksystem ();
bs.username = This.tbName.Text.Trim ();
BS. Power = 1;
BS. ShowDialog ();
this. Hide (); .
Booksystem bs = new Booksystem ();
This. Hide ();//hides the current window
Bs. ShowDialog (); Pop up a second window
This. Close ();//Closes the first window
To open a new window, the effect of closing the current window is the code above.
To close the entire program after you close the pop-up form
Booksystem bs = new Booksystem ();
Bs. ShowDialog (); Opens the Booksystem form as a modal dialog box, and then executes the statement below the code when the Booksystem form is closed.
Application.exit ();//exit the entire application.
Booksystem bs = new Booksystem ();
Bs. Show (); Pop-up window
Application.exit ();//Exit Program
C # this. Hide ()