Unit 'msegui' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#msegui]

tguiapplication.beginwait

beginwait shows the wait cursor during a long operation, until the matching endwait; calls can be nested

Declaration

Source position: msegui.pas line 3318

public procedure tguiapplication.beginwait(

  const aprocessmessages: Boolean = False

); override;

Description

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.


Documentation generated on: 2026-10-03