N
Nathan
I know this has been asked previously, but I've run into a situation where I
need to know the difference between close and dispose, and I can't get the
information I need from msdn help or previous posts.
I have a game form that has a timer, which runs as long as the game is being
played. When the timer reaches zero, the GameOver form is called. On the
game form is a Quit button, in whose click event I have only the command
"Me.Close". However, when I hit Quit before the timer runs out, the form
closes, but the timer still runs. I know this because as I'm working with
other forms in the application, the GameOver form will pop up out of
nowhere. If I use "Me.Dispose" in the Quit button's click event, there is
no problem.
What I want to know is basically what is the difference between close and
dispose? Is msdn library incorrect when it says "When a form is closed, all
resources created within the object are closed and the form is disposed"?
need to know the difference between close and dispose, and I can't get the
information I need from msdn help or previous posts.
I have a game form that has a timer, which runs as long as the game is being
played. When the timer reaches zero, the GameOver form is called. On the
game form is a Quit button, in whose click event I have only the command
"Me.Close". However, when I hit Quit before the timer runs out, the form
closes, but the timer still runs. I know this because as I'm working with
other forms in the application, the GameOver form will pop up out of
nowhere. If I use "Me.Dispose" in the Quit button's click event, there is
no problem.
What I want to know is basically what is the difference between close and
dispose? Is msdn library incorrect when it says "When a form is closed, all
resources created within the object are closed and the form is disposed"?