Results 1 to 3 of 3

Thread: Cancle closing[resolved]

  1. #1

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Cancle closing[resolved]

    In the form actions closing, I have code to pop-up a dialog box which asks the user if they want to save there work or not or if they want to cancle the closing. How do I tell it to not close when they hit cancle?
    Last edited by Kasracer; Jul 20th, 2003 at 11:49 PM.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Here is how to handle closing the form event ,
    VB Code:
    1. Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
    2. System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    3.  
    4.         e.Cancel = True
    5.  
    6. End Sub

  3. #3

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Pirate
    Here is how to handle closing the form event ,
    VB Code:
    1. Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
    2. System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    3.  
    4.         e.Cancel = True
    5.  
    6. End Sub
    Thanks alot, works perfectly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width