TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
soonhuat81
NA
31
0
Respond only after i click twice at the button(Dialog Box)
Jun 7 2004 4:07 AM
I've created a dialogBox form with 2 button on it, "Yes", and "No". When the user click at button "Yes", message "You click Yes" will prompt out. And "you click No" message will prompt out if the users click at "No" button. Here r the source code. DialogConfirmation confirm = new DialogConfirmation (); if (confirm.ShowDialog() == DialogResult.Yes) { MessageBox("You Click Yes"); } else if (confirm.ShowDialog() == DialogResult.No) { MessageBox("You Click NO"); } The problem is i have to click the "No" button twice in order to prompt out the message "You click NO" .. As far as i know, the problem raised because I've make 2 evaluation here as : if (confirm.ShowDialog() == DialogResult.Yes) and if (confirm.ShowDialog() == DialogResult.No) .. How am i goin to solve the problem ? i know it can be easily solve by the following code: if (confirm.ShowDialog() == DialogResult.Yes) { MessageBox("You Click Yes"); } else { MessageBox("You Click NO"); } but what if i have 3 or more buttons in a dialog box ? Hope someone can help thanks.
Reply
Answers (
1
)
How to use MyIE's WD_Commands?
Interfaces