Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / September 2005

Tip: Looking for answers? Try searching our database.

preventing form to close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam - 12 Sep 2005 10:12 GMT
Hi,
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?

Thx
Sam - 12 Sep 2005 10:15 GMT
ha... i've found it. Cancel property of the canceleventargs....
Herfried K. Wagner [MVP] - 12 Sep 2005 12:03 GMT
"Sam" <samuel.berthelot@voila.fr> schrieb:
> Once the user has clicked on the close button of my MDI form I do error
> checking in the Closing event if errors have been found the form should
> not be closed.
> How can I prevent the form to be closed though ?

Set 'e.Cancel = True' in the event handler.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.