C
cj
I had found some code I used in VB2005 to show an about box. The about
box itself was just a windows form with a button on it. The button had
no code behind it but it's dialogresult property is set to cancel. The
help about menu item showed the form like this:
Private Sub AboutToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
Try
Dim myAboutDialog As New About
myAboutDialog.ShowDialog()
If myAboutDialog.DialogResult =
System.Windows.Forms.DialogResult.OK Then
myAboutDialog.Dispose()
End If
Catch ex As Exception
System.Console.WriteLine(ex.Message.ToString())
End Try
End Sub
I'm playing with VB2008 now and I was dupliating this application in
2008 and I noticed it has an about box template form to use. I notice
it's ok button had the code me.close behind it.
Can anyone tell me which way I should do this in 2008?
Should I still call the form by saying
Private Sub AboutToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
Try
Dim myAboutDialog As New AboutBox1
myAboutDialog.ShowDialog()
If myAboutDialog.DialogResult =
System.Windows.Forms.DialogResult.OK Then
myAboutDialog.Dispose()
End If
Catch ex As Exception
System.Console.WriteLine(ex.Message.ToString())
End Try
End Sub
What are the differences in how the about form is being handled?
box itself was just a windows form with a button on it. The button had
no code behind it but it's dialogresult property is set to cancel. The
help about menu item showed the form like this:
Private Sub AboutToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
Try
Dim myAboutDialog As New About
myAboutDialog.ShowDialog()
If myAboutDialog.DialogResult =
System.Windows.Forms.DialogResult.OK Then
myAboutDialog.Dispose()
End If
Catch ex As Exception
System.Console.WriteLine(ex.Message.ToString())
End Try
End Sub
I'm playing with VB2008 now and I was dupliating this application in
2008 and I noticed it has an about box template form to use. I notice
it's ok button had the code me.close behind it.
Can anyone tell me which way I should do this in 2008?
Should I still call the form by saying
Private Sub AboutToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
Try
Dim myAboutDialog As New AboutBox1
myAboutDialog.ShowDialog()
If myAboutDialog.DialogResult =
System.Windows.Forms.DialogResult.OK Then
myAboutDialog.Dispose()
End If
Catch ex As Exception
System.Console.WriteLine(ex.Message.ToString())
End Try
End Sub
What are the differences in how the about form is being handled?