advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Cancel Property Details
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 commandbutton.Cancel[ = boolean%]
 
 Usage Notes
   ■ Regardless of which control has the focus, the Cancel button's Click
     event is invoked if the Esc key is pressed and the control with the
     focus does not receive a keyboard event (KeyDown, KeyPress, or KeyUp).
     See: ◄KeyDown Event►  ◄KeyPress Event►  ◄KeyUp Event►
 
   ■ A commmand button with its Cancel property set to True (-1) is referred
     to as the form's Cancel button. See: ◄Command Button Control►
 
   ■ Only one button on a form can be the Cancel button.
 
   ■ When Cancel is set to True (-1) for one button, it is automatically set
     to False (0) for all other buttons.
 
   ■ Use the Cancel property to give users the option of canceling
     uncommitted changes and returning the form to its previous state.
 
   ■ Code for the Cancel property should be placed in the command button's
     Click event. See: ◄Click Event►
 
   ■ For a form that supports an irreversible action such as a delete
     operation, make the Cancel button the default button. To do this, set
     the button's Default property to True (-1). See: ◄Default Property►