|
|
|
|
- Features of the dialog box
- Line break in the dialog box
- Special cases
InfoWithTimeout (Function) In french: InfoAvecDélai Displays a custom information message inside a system info box for a specified amount of time. After the timeout, the system window is automatically closed. Remarks: - This information window blocks the application until the time limit has elapsed. To continue running the application, the user must click "OK".
 To avoid blocking the application, use InfoWithTimeoutAsynchronous. WINDEV allows you to apply the skin template of your project to this dialog box. For more details, see Customizing dialog boxes.
// Displays an information window // with automatic closing after 10 seconds InfoWithTimeout(1000, "Operation successful")
Syntax
InfoWithTimeout(<Timeout> , <Text> [, <Line 2> [... [, <Line n>]]])
<Timeout>: Integer ou Duration Amount of time (expressed in hundredths of a second) before automatically closing the system information window. The minimum timeout is 1 second. This parameter can be: - an integer corresponding to the number of hundredths of a second,
- a Duration variable,
- the duration in a readable format (e.g., 1 s or 1000 ms).
<Text>: Character string Text to display. <Line 2>: Optional character string Text displayed on the next line. <Line n>: Optional character string Text displayed in the following lines. Remarks Features of the dialog box - The title of the dialog box is the title of the current window. To modify this title, use NextTitle.
- The message is aligned to the left.
- The button caption depends on the runtime language of Windows.
- The maximum number of characters cannot exceed 4096. If a larger string is passed as parameter, it will be truncated.
- The icon displayed (information tooltip) cannot be modified.
To customize this dialog box (and all the system dialog boxes in your application), check "Customize system windows (Info, YesNo, Confirm, Dialog)" in the "Style" tab of the project description. For more details, see Customizing dialog boxes.
Line break in the dialog box The CR string (Carriage Return) can be used to force a break to the next line. For example: InfoWithTimeout(500, "The form XXX was modified." + CR + "This form will be saved.")
is equivalent to: InfoWithTimeout(500, "The form XXX was modified.", "This form will be saved.")
You also have the ability to use the syntax of multiline strings. For example: InfoWithTimeout(500, [ The XXX form has been modified. Â This form will be saved. ])
- Timers (TimerSys) are not stopped when this function is called.
- Windows events are not stopped when this function is called.
- The text of the buttons is displayed in the system language.
- Equivalence: InfoWithTimeout is equivalent to Info used with DelayBeforeClosing:
The following code:
InfoWithTimeout(1000, "Form modified")
is equivalent to:
DelayBeforeClosing(1000) Info("Form modified")
Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|