Results 1 to 3 of 3

Thread: 'X' click event --> RESOLVED

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210

    'X' click event --> RESOLVED

    how can i get the event of the click on the 'X' button??

    I want to put an confirmation on the exit of the application!

    Thank you,
    Guilherme Costa
    Last edited by gccosta; Oct 2nd, 2003 at 02:43 PM.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Form_Closing event .

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Like this
    VB Code:
    1. Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles
    2. MyBase.Closing
    3.  
    4. If MessageBox.Show("Close this form ?", Nothing, MessageBoxButtons.YesNo) = DialogResult.Yes Then
    5.             e.Cancel = False
    6.         Else
    7.             e.Cancel = True
    8.         End If
    9.  
    10.  End Sub

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