ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Dialog Box functions
  • Features of the dialog box
  • Miscellaneous
  • Emulation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Displays a custom error message in a system error window.To close the window, the user must click OK.
WINDEV WINDEV allows you to apply the skin template of your project to this dialog box. For more details, see Customizing dialog boxes.
WINDEV In a web service, ErrorBuild is used to define the error returned by the web service. If ErrorBuild is called multiple times, the error messages are concatenated.
Example
WINDEVUniversal Windows 10 AppJavaUser code (UMC)
NextTitle("Error: Unknown customer")
ErrorBuild("The %1 code does not exist. It must be created.", cCustomerCode)
Syntax
ErrorBuild(<Format string> [, <Parameter 1> [... [, <Parameter N>]]])
<Format string>: Character string
Character string to display containing optional parameters (%1 to %n). To display the % character, this character must be typed twice (%%).
<Parameter 1>: Optional character string
First parameter that will be inserted into the formatted character string.
<Parameter 1> will replace the %1 character, <Parameter 2> will replace the %2 character, etc.
The number of specified parameters must be equal to or greater than the number of parameters used in <Format string>.
If <Format string> contains more parameters, the additional parameters will be replaced with empty strings.
<Parameter N>: Optional character string
Nth parameter that will be inserted into the formatted character string.
<Parameter 1> will replace the %1 character, <Parameter 2> will replace the %2 character, etc.
The number of specified parameters must be equal to or greater than the number of parameters used in <Format string>.
If <Format string> contains more parameters, the additional parameters will be replaced with empty strings.
Remarks

Features of the dialog box

  • The title of the dialog box corresponds to the title of the current window (or page).
  • To modify or define the title of dialog box, 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 (white cross) cannot be modified.
WINDEV 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.

Miscellaneous

  • Timers (TimerSys) are not stopped when this function is called.
  • WINDEV Windows events are not stopped when this function is called.
  • WINDEVJava DelayBeforeClosing limits how long the message is displayed. The dialog box is automatically closed. For question or confirmation dialog boxes, the default button corresponds to the expected answer.
  • The caption of the button is displayed in the language used by Windows on the current computer.
WINDEV

Emulation

An error message can be emulated by EmulateError.
Component: wd290obj.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/28/2024

Send a report | Local help