SET LIBRARY TO vfpProgressDialog.fll * Sets the title of the progress dialog box pd_SetTitle('Shipping and handling') * Displays a message in the progress dialog: lines 1,2,3 are available pd_SetLine(1, 'Running database daily maintenance') && 1st line pd_SetLine(2, 'Removing invalid product orders...') && 2nd line * Sets a message to be displayed if the user cancels the operation pd_SetCancelMsg('Please wait while we cancel the processing...') * starts the dialog as a child to main VFP window, * with flags PROGDLG_AUTOTIME and PROGDLG_NOMINIMIZE pd_StartDialog( _screen.HWnd, 10) && 11, 32+3, 32+3+64 * Animation to be displayed - WinXP only * Shell32 AVI #172: moving files to the Recycle Been pd_SetAnimation( 162 ) && try other Ids in [160..170] range * Emulates a time consuming process FOR nIndex = 1 TO 100 pd_SetProgress(nIndex) = INKEY(0.5) * Important: the OS sends _no_ messages to the application * when the user clicks the Cancel button. * * VFP application must _periodically_ call pd_HasUserCancelled function * to determine whether the operation has been canceled. IF ( pd_HasUserCancelled() ) EXIT ENDIF NEXT * Stops the progress dialog box and removes it from the screen pd_StopDialog()