MessageBox.Show("1 or 2? ", "??", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
how to make
if message box click yes, then show "1"
else click no then show "2" ?
Printable View
MessageBox.Show("1 or 2? ", "??", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
how to make
if message box click yes, then show "1"
else click no then show "2" ?
do you mean this??
Code:If MessageBox.Show("1 or 2? ", "??", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = Windows.Forms.DialogResult.Yes Then
MessageBox.Show("1")
Else
MessageBox.Show("2")
End If
You can't ask the question "1 or 2" and with a permissible answer of Yes or No, so it sounds like you should make your own dialog form.
I do agree it sounds a bit confusing.Quote:
Originally Posted by Bulldog
To use the built in messagebox, I would suggest changing the wording to something like "Click Yes for 1, Click No for 2" or something like that.
Making your own form to be like a messagebox is also a pretty painless procedure.
ya, my meaning is to give the user to choose,Quote:
Originally Posted by kleinma
if you click yes, then do something
else if you click no, then you will do another thing.
well then my first post with the code example shows you how to do that ;)
wow, that's great! thx Moderator :pQuote:
Originally Posted by kleinma