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 AboutToolStripM enuItem_Click(B yVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AboutToolStripM enuItem.Click
Try
Dim myAboutDialog As New About
myAboutDialog.S howDialog()
If myAboutDialog.D ialogResult =
System.Windows. Forms.DialogRes ult.OK Then
myAboutDialog.D ispose()
End If
Catch ex As Exception
System.Console. WriteLine(ex.Me ssage.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 AboutToolStripM enuItem_Click(B yVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AboutToolStripM enuItem.Click
Try
Dim myAboutDialog As New AboutBox1
myAboutDialog.S howDialog()
If myAboutDialog.D ialogResult =
System.Windows. Forms.DialogRes ult.OK Then
myAboutDialog.D ispose()
End If
Catch ex As Exception
System.Console. WriteLine(ex.Me ssage.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 AboutToolStripM enuItem_Click(B yVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AboutToolStripM enuItem.Click
Try
Dim myAboutDialog As New About
myAboutDialog.S howDialog()
If myAboutDialog.D ialogResult =
System.Windows. Forms.DialogRes ult.OK Then
myAboutDialog.D ispose()
End If
Catch ex As Exception
System.Console. WriteLine(ex.Me ssage.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 AboutToolStripM enuItem_Click(B yVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AboutToolStripM enuItem.Click
Try
Dim myAboutDialog As New AboutBox1
myAboutDialog.S howDialog()
If myAboutDialog.D ialogResult =
System.Windows. Forms.DialogRes ult.OK Then
myAboutDialog.D ispose()
End If
Catch ex As Exception
System.Console. WriteLine(ex.Me ssage.ToString( ))
End Try
End Sub
What are the differences in how the about form is being handled?
Comment