B
Bob
I wrote a simple VB program that runs.
When I click on the close button in the upper right hand corner
of the main windows, the program closes. Or at least it appears to.
If I look in the Task List manager, I can still see my app TTEST.EXE running.
If I start it up again, I get a second instance of TTEST.EXE running.
I thought that if I call Application.Exit this would kill the task but it does not.
How do I properly close my program so that it kills the task?
Here is my startup code.
Public Class Startup
Private Shared m_MainForm As MainTabForm
' This class is created so that I take control of the Mainform from VB.net
' This gives me global access to all members of the form
Public Shared ReadOnly Property MainForm() As MainTabForm
Get
Return m_MainForm
End Get
End Property
Public Shared Sub Main()
m_MainForm = New MainTabForm
Application.Run(m_MainForm) ' Run my MainForm Windows
m_MainForm.Close()
Application.Exit()
End Sub
End Class
When I click on the close button in the upper right hand corner
of the main windows, the program closes. Or at least it appears to.
If I look in the Task List manager, I can still see my app TTEST.EXE running.
If I start it up again, I get a second instance of TTEST.EXE running.
I thought that if I call Application.Exit this would kill the task but it does not.
How do I properly close my program so that it kills the task?
Here is my startup code.
Public Class Startup
Private Shared m_MainForm As MainTabForm
' This class is created so that I take control of the Mainform from VB.net
' This gives me global access to all members of the form
Public Shared ReadOnly Property MainForm() As MainTabForm
Get
Return m_MainForm
End Get
End Property
Public Shared Sub Main()
m_MainForm = New MainTabForm
Application.Run(m_MainForm) ' Run my MainForm Windows
m_MainForm.Close()
Application.Exit()
End Sub
End Class