Opens the wait window of application. The user cannot access the graphic application interface as long as the wait window of application is displayed.
// Downloads an image from Internet and displays it in an Image control of application
// Display the wait window
WaitWindowStart("Downloading the image...")
// Start the download thread
ThreadExecute("MyThread", threadNormal, procDownloadImage)
INTERNAL PROCEDURE procDownloadImage
// Download the image
IF HTTPRequest("https://www.windev.com/img/visual/21/logo-pcsoft.png") THEN
bufImage is Buffer = HTTPGetResult()
// Display the downloaded image in an Image control of the window
INTERNAL PROCEDURE procUpdImage
IMG_NoName1 = bufImage
// Close the wait window
<Message>: Character string
Message to display in the wait window.
- To close the wait window, WaitWindowEnd must be called as many times as WaitWindowStart was called.
- A single wait window can be displayed at a time. If WaitWindowStart is called while the wait window is already opened, the message displayed will be refreshed with the message specified during the last call.
- WaitWindowStart and WaitWindowEnd can be called from a secondary thread.
- The wait window displays an infinite progress bar. In order for this progress bar to be displayed and animated, you must give control back to the main application thread when running the process that requires a wait. This process should be performed in a secondary thread or in a parallel task. If the process must access the GUI, call ExecuteMainThread to perform these accesses.
- The wait window opened by WaitWindowStart is using the same window as the one displayed for the application hourglass (Hourglass). The calls to Hourglass and WaitWindowStart/WaitWindowEnd should not be nested.
- The wait window is linked to the current window when it was opened. If this window is closed, the wait window will also be closed.
Business / UI classification: UI Code