0

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?

Edited by xanawa: n/a

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by xanawa
1

is 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)
{

}

Edited by samueal: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.