Hi,
I am using windows form. Now in this window i have 2 textboxes which have their validation using the error provider. Now i want that when the user clicks on the close button it closes not rests until u enter something in the textboxes. How can i do so?
xanawa
-3
Junior Poster
Recommended Answers
Jump to Postis there any property or no?
go to form event and write your logic to check validation in its closing event.
For Example: If your form is Form1 then,
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { }
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.