beginwait shows the wait cursor during a long operation, until the matching endwait; calls can be nested
Source position: msegui.pas line 3318
public procedure tguiapplication.beginwait( |
const aprocessmessages: Boolean = False |
); override; |
beginwait shows the wait cursor during a long operation, until the matching endwait; calls can be nested. When the last endwait is called, the key presses, mouse clicks and mouse wheel events received in the meantime are discarded. During the operation, waitescaped returns True if the user pressed Esc, which allows to cancel it:
application.beginwait; try while not finished do begin dosomething; if application.waitescaped then begin break; end; end; finally application.endwait; end;
To show a dialog with a Cancel button instead, use waitdialog.