• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Canceling Events

In some cases, you can cancel an event from your code. When you do so, the action that triggered the event is also cancelled. For example, the Exit event from a control can be cancelled. You can tell which events can be cancelled because their event procedures have a Cancel argument. To cancel an event, set this argument to True somewhere in your event handling code, as in this example:

Private Sub Client_Exit(Cancel As Integer)
  Cancel = True
End Sub


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint