Skip validation with controlbox of winform? [duplicate]


This question already has an answer here:


I already gave you the answer in your previous question. Stop using MessageBox and your problem disappears. Use the ErrorProvider component instead.

Intercepting the form's closing handling so you can cancel the validation before the first event fires requires a hack. Paste this code into your form:

    protected override void WndProc(ref Message m) {
        // Intercept WM_SYSCOMMAND, SC_CLOSE
        if (m.Msg == 0x112 && (m.WParam.ToInt32() & 0xfff0) == 0xf060) this.AutoValidate = AutoValidate.Disable;
        base.WndProc(ref m);

Need Your Help

Rails - Help with rake task

ruby-on-rails rake rake-task

I have a rake task I need to run in order to sanitize (remove forward slashes) some data in the database. Here's the task:

Set position in customized list field in Blackberry?

java blackberry

I want three list field items to be displayed, from bottom to top. I am able to display three list field items, but they display from top to bottom. I have tried setting the position, but it isn't

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.