-
VB.Net Closing From
I am having trouble closing a form. Here is the scenario:
'------------- Code Sample ------------
Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True
Me.Visible = False
End Sub
'--------------------------------------
When the form Close button is clicked, the form closing event is cancelled and the form is minimized to the Notification area. The user can exit the program by selecting the appropriate menu option. This all works as it should.
The problem arises when Windows attempts to close the program when shutting down or restarting Windows.
How can i differentiate between a user clicking the form Close button and the system trying to close the application?
-
Last edited by Phil Weber; 05-09-2005 at 08:29 PM.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks