Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message Box buttons

Status
Not open for further replies.

rusel01

MIS
Aug 6, 2003
13
US
Can I change a message box button to whatever I want? if so whats the command. When I do a "Messageboxbuttons." It only gives me the basic choices. can I use whatever text I want? Thank you
 
YOu can create your own form and use the showdialog method of the form to get the same effect. Then you can add any buttons you want

Here are the click events

Private Sub Yes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Yes.Click
Me.DialogResult = DialogResult.Yes
Me.Close()
End Sub

Private Sub No_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles No.Click
Me.DialogResult = DialogResult.No
Me.Close()
End Sub

Private Sub Retry_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Retry.Click
Me.DialogResult = DialogResult.Retry
Me.Close()

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top