Any way to easily cancel a Winform from opening?


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
How can I cancel the creation or opening of a form, from within the form? I.e. I'd like to validate the configuration of the form and if it fails, cancel the opening of the form and I'd like to throw an exception. This is mostly so the form is opened correctly by code (not the user). The validation might be done in a constructor or in the load event handler. Is there any way to do that?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search