Home Notices Documents Classes Download Others Rice
Classes  >  canceleventargs  >  Cancel(bool)
canceleventargs class : Cancel(bool) setter

Description

Sets a value indicating whether the event should be canceled.

Syntax

canceleventargsInstance.Cancel = cancel

Arguments

ClassNameDescription
boolcancelA value indicating whether the event should be canceled.

Return value

None

Sample code

1:

open method void anyWindowClosingHandler(canceleventargs cea)

2:

...

3:

cea.Cancel = true; // The closing of the application window will be cancel.

4:

...

5:

endmethod

Notes

It's a wrapper of the System.ComponentModel.CancelEventArgs.Cancel property.

When want to cancel the event, set true. When do not want to cancel, set false.

Default value is false.

The canceleventargs will only appear as an argument of the window closing event handler.

Links for reference

Copyright © Rice All rights reserved.