ProgressDialogShow(maximum As Integer, title As String) As Integer

 

Display progress about a recurring activity to the user

 

 

 

Parameters:

 

Name

Type

Description

maximum

Integer

total number of recurring actions

For instance the total number of address records to be imported

title

String

Message to be displayed on the progress dialog window.

Information for the user.

 

Returns:

 

Type

Value

Description

Integer

0 or greater

Dialog handle. Identification number of the dialog window, displayed to the user.

Integer

-2

An ERROR occured, while attempting to display the dialog window.

 

Available in:

 

WindowMain

WindowLink

YES

NO

 

 

Example XojoScript:

 

// Define maximum value of a recurring action

Dim total As Integer = 50000

 

// Define start value

Dim j As Integer = 0

 

// Show nws dialog window with a progressbar and custom message

Dim hProg As Integer = ProgressDialogShow(total, "Import oder Update von Adressen")

 

If hProg >= 0 Then

 

// Loop from start to maximum value and execute the recurring action

While j <= total

 

// show progress

ProgressDialogSetText(hProg, j)

 

// add recurring action here

// ...

 

j = j + 1

WEnd

End If

 

// Close progress dialog and free up memory

ProgressDialogClose(hProg)