I have noticed that if you close down a form by using "Close Window" in the Task Bar, then it does not actually close the application - it puts it running as a "Background Process" if you look in Task Manager!
You can get round this by intercepting the Form Closing event:
Code:
Private Sub frmMyForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
End
End Sub
So, is this a fault or a feature?
I have lots of forms so can I do something somehwere that would look like this?
Code:
Private Sub FormMaster(sender As Object, e As FormClosingEventArgs) Handles _
MyForm01.FormClosing,
MyForm02.FormClosing,
MyForm03.FormClosing,
MyForm04.FormClosing
End
End Sub
So, you turned off the application framework, and are running into some issues. Since you are using forms, why turn off the application framework? What are you gaining other than making things a bit more awkward?
The app starts in Main() - because it uses command line arguments etc - so looks like I cannot set the Shutdown Mode?
You can take command line arguments with the Application Framework enabled.
At the bottom of the Project Application tab, select Application Events. One of the application events is the startup event, which will contain the command line arguments as part of that method parameter.
"Ok, my response to that is pending a Google search" - Bucky Katt. "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk. "Before you can 'think outside the box' you need to understand where the box is."
So, you turned off the application framework, and are running into some issues. Since you are using forms, why turn off the application framework? What are you gaining other than making things a bit more awkward?
"Ok, my response to that is pending a Google search" - Bucky Katt. "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk. "Before you can 'think outside the box' you need to understand where the box is."