Previously, this: In the trial period detection at the time of the program, if the detection failed returns false, then end the program in the SUB main ()
Public Sub Main ()
'...
IF checkedate () = false then
End
END IF
Application.run (New frmmain)
End Sub
I just want to use Application.exit () directly with Application.exit () directly, tested it, I found out.
Prompt the software has executed Application.exit (), but the program has not exited, but continues to run.
Checked MSDN and found that it should be like this: Application.exit method notifies all message pumps must be terminated and all application windows are turned off after processing the message. Note
This method stops all messages loops running on all threads and closes all the windows of the application. This method does not force the application to exit. The EXIT method is usually called from one message loop that enforces RUN to return. To exit a message loop for the current thread, call ExitThread.
WARNING When the Application.exit method is called to exit the application, it does not trigger
Form.closed
with
Form.Closing
event. If there is a validation code in one of the events that must be executed, you should call each open form before calling the exit method.
Form.close
method.