|
-
Jul 20th, 2007, 12:54 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] yes no button question
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" ?
-
Jul 20th, 2007, 12:57 PM
#2
Re: [2005] yes no button question
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
-
Jul 20th, 2007, 12:58 PM
#3
Re: [2005] yes no button question
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.
-
Jul 20th, 2007, 01:01 PM
#4
Re: [2005] yes no button question
 Originally Posted by Bulldog
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.
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.
-
Jul 20th, 2007, 01:03 PM
#5
Thread Starter
Hyperactive Member
Re: [2005] yes no button question
 Originally Posted by kleinma
I do agree it sounds a bit confusing.
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,
if you click yes, then do something
else if you click no, then you will do another thing.
-
Jul 20th, 2007, 01:05 PM
#6
Re: [2005] yes no button question
well then my first post with the code example shows you how to do that
-
Jul 20th, 2007, 01:11 PM
#7
Thread Starter
Hyperactive Member
Re: [2005] yes no button question
 Originally Posted by kleinma
well then my first post with the code example shows you how to do that 
wow, that's great! thx Moderator
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|