Why does the process not end?
-
I have this VB app. When I use my exit-button to close it down everything is fine, but when I use the X-button in the top right corner, the window disappears, but leaves a process running. How do I fix this? Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas." -
I have this VB app. When I use my exit-button to close it down everything is fine, but when I use the X-button in the top right corner, the window disappears, but leaves a process running. How do I fix this? Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas."Sounds to me like you might have one of the following: 1 - A form that is hidden but not unloaded (there is a difference). 2 - An object variable that has not been set = to Nothing when you are done with it. Paul Watson wrote: At the end of the day it is what you produce that counts, not how many doctorates you have on the wall.
-
Sounds to me like you might have one of the following: 1 - A form that is hidden but not unloaded (there is a difference). 2 - An object variable that has not been set = to Nothing when you are done with it. Paul Watson wrote: At the end of the day it is what you produce that counts, not how many doctorates you have on the wall.
Ah, there is a form that is hidden (frmComSelect in the code below). But how do I close it? I have a hard time finding anything useful in MSDN. The app is designed like this: First a window is displayed prompting the user to make a selection. Thereafter, the main window is displayed.
Private Sub Command1_Click() If (optCom1(0).Value = True) Then PortNum = 1 ElseIf (optCom1(1).Value = True) Then PortNum = 2 ElseIf (optCom1(2).Value = True) Then PortNum = 3 ElseIf (optCom1(3).Value = True) Then PortNum = 4 End If If (Adapter(0).Value = True) Then PortType = 1 ElseIf (Adapter(1).Value = True) Then PortType = 5 End If frmComSelect.Hide frmMain.Show Main End Sub
Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas." -
Ah, there is a form that is hidden (frmComSelect in the code below). But how do I close it? I have a hard time finding anything useful in MSDN. The app is designed like this: First a window is displayed prompting the user to make a selection. Thereafter, the main window is displayed.
Private Sub Command1_Click() If (optCom1(0).Value = True) Then PortNum = 1 ElseIf (optCom1(1).Value = True) Then PortNum = 2 ElseIf (optCom1(2).Value = True) Then PortNum = 3 ElseIf (optCom1(3).Value = True) Then PortNum = 4 End If If (Adapter(0).Value = True) Then PortType = 1 ElseIf (Adapter(1).Value = True) Then PortType = 5 End If frmComSelect.Hide frmMain.Show Main End Sub
Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas."You would use
frmComSelect.Unload
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
-
You would use
frmComSelect.Unload
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
The compiler does not like that. It says 'Method or data member not found' Do I have the wrong type of window? Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas." -
You would use
frmComSelect.Unload
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
Unload frmComSelect
works fine. Thanks for the pointer. Cheers, Fredrik
"Felix qui potuit rerum cognoscere causas."