Windows wont Shutdown when running my App
Posted on 2004-08-11
I have a slight problem - Windows wont shut down when its running my app. The code which affects it is below, the only problem is the same line of code is what stops my app closing when the [X] is clicked, so i can place it in the systemtray. Any info as to why this happens, or a workaround would be really helpful.
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True '<---- Culprit (Wont Allow Windows to Shutdown)
As an afterthought could probably set e.Cancel = False, if it's possible to detect when windows wants to shutdown.