ErrorProvider prevents form from closing
Posted on 2006-03-31
Looking at MSDN sample SplitContainer I found that ErrorProvider control doesn't allow to close owner form if there is some error. For example, if I type non-numeric string to the Splitter Width editbox, form cannot be closed.
In typical dialog I would like to prevent it from closing using OK button, if there is error, and allow to close using Cancel or Close button in any case. How can I do this?