K
Kevin R
I'm running the HelloWorldForm example from Microsoft to learn how to use
..net. I'm using Microsoft Visual Studio .NET 2003, 1.1 framework.
I run the HelloWorldForm example. The example runs but the text "Disposed!"
does not appear on the MessageBox. I can get the text to display if I add
aditional MessageBox switch options. Is there a reference or something I'm
missing so I don't have to add these options everytime I use the MessageBox?
Thanks!
Kevin R.
==========
Here is the code in the example:
'Called when the Form closes
'Note that the MessageBox call is simply to
'demonstrate that Dispose is called.
'You should keep your Dispose method code as simple and robust as possible
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
Try
MessageBox.Show("Disposed!")
Catch ex As Exception
End Try
MyBase.Dispose(disposing)
End Sub
I modified the code as follows to display the "Disposed" text message.
MessageBox.Show("Disposed!", "Caption", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)
..net. I'm using Microsoft Visual Studio .NET 2003, 1.1 framework.
I run the HelloWorldForm example. The example runs but the text "Disposed!"
does not appear on the MessageBox. I can get the text to display if I add
aditional MessageBox switch options. Is there a reference or something I'm
missing so I don't have to add these options everytime I use the MessageBox?
Thanks!
Kevin R.
==========
Here is the code in the example:
'Called when the Form closes
'Note that the MessageBox call is simply to
'demonstrate that Dispose is called.
'You should keep your Dispose method code as simple and robust as possible
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
Try
MessageBox.Show("Disposed!")
Catch ex As Exception
End Try
MyBase.Dispose(disposing)
End Sub
I modified the code as follows to display the "Disposed" text message.
MessageBox.Show("Disposed!", "Caption", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)