Messagebox in Vb.Net

Posted by Venkat | Labels:

Showing messagebox like yes , no in vb.net and proceed if yes else exit ..

       Dim button As DialogResult

button = MessageBox.Show _
("Are you sure you want to exit this application?", _
"Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)

If button = Windows.Forms.DialogResult.Yes Then
Me.Close()
Else
'Do Nothing
End If

0 comments:

Post a Comment

Thanks for the Comments.

PayOffers.in