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 Brennan
NA
114
85.3k
Im using the leave event of a text box
Apr 13 2011 9:56 AM
I am using the leave event of a text box to validate a username and password - the problem is if the user has started to enter data in the text box and they decide to press the cancel button - the leave event on the text box does not need calling. Is there a way to stop the leave event happening if the cancel button is pressed. can I use the 'try and catch' thing and check if the click event on cancel has happened? If so can some on explain try catch as i have never used it. Like what is optional and compulsory and how the logic flows through it?
---------------------
Solved it like this
if
(!btnChangePasswordCancel.Focused) [this is inside the leave event]
dont validate the text
Reply
Answers (
7
)
C# MonthlyCalendar
show message box when cursor move to next textbox