Open one Form window and close the other (C #);
For example: a login window, after login, the login window closes, and another window opens!
Please advise!
I do it
Create a NewForm in the FormLoad of the MainForm, complete the verification process in the NewForm, and then dispose the NewForm. At this time, the MainForm continues to execute and just displays.
Use multi-threaded operation.
Introducing namespaces
Imports System.Threading
Write a method
Private Sub FormStart ()
Application.Run (New NewForm) '* Run a new program window
End Sub
Then write the following statement under the button of your LoginForm
Dim thread As New Thread (New ThreadStart (AddressOf FormStart)) '* Define a new thread to open the form
thread.Start ()
Application.Exit () '* Close the login form