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
Richard Arnold
1.7k
13
17.1k
Responding to DialogResult RetryCancel
Jan 1 2013 8:52 PM
My application allows the user to select a particular file to import from a ToolStripDropDownButton. The code then displays an OpenFileDialog for them to browse to the file to import.
As the file actually chosen may be different from the selected ToolStripDropDownButton item, I want to prevent an incorrect file from being copied. I wrote a method which compares the two selections and displays a RetryCancel DialogResult in a MessageBox.
If the user clicks "Retry", I want to return to the calling code's OpenFileDialog for the user to make another file selection.
If the user clicks "Cancel", I do
Not want to exit
the application, just allow the user to continue using the application.
How do I return to the calling code's OpenFileDialog based on the "Retry" button and how can I handle the "Cancel" button?
I have attached the simple method example. Thank you in advance.
Attachment:
responding to dialogresult retrycancel.zip
Reply
Answers (
2
)
showing sql table row by row in form textboxes
How to create patches that upgrade windows application?