PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From version 17, this feature is no longer available.
Displays a message containing a title, a list of choices, an icon and a combination of buttons.
Note: No message is displayed if the agent is invisible.
Example
// Initialize the list of choices
MyChoices is array of 3 strings
MyChoices[1] = "My first choice"
MyChoices[2] = "My second choice"
MyChoices[3] = "My third choice" + CRLF + "on two lines"
// Displays a message
ResChoice = AgentChoice(&MyChoices, "Choose!", 3, ...
agtB_OKC + agtI_Question + agtMODALYES)
Syntax
<Result> = AgentChoice(<List of Choices> , <Message Title> , <Number of Choices> , <Message Style>)
<Result>: Integer constant
  • Return constant identifying the button selected by the user,
  • -1 if an error occurred.
The following constants are available:
agtR_OKOK
agtR_CANCELCancel
agtR_ABORTAbandon
agtR_RETRYRetry
agtR_IGNOREIgnore
agtR_YESYes
agtR_NONo
<List of Choices>: Character string
Address of array of multiline character strings. This address must be preceded by '&'.
<Message Title>: Character string
Multiline title of message.
<Number of Choices>: Integer
Number of character strings found in the "List of Choices" array.
<Message Style>: Combination of Integer constants
Specifies the message style:
  • The buttons:
    agtB_OKOK
    agtB_OKCOK and Cancel
    agtB_ARIAbort, Retry, Ignore
    agtB_YNCYes, No, Cancel
    agtB_YNYes, No
    agtB_RCRetry, Cancel
  • The icons:
    agtI_HANDWhite cross, red backgroundAgentBeep: emergency stop sound
    agtI_QUESTIONQuestion markAgentBeep: interrogation sound
    agtI_EXCLAMATIONExclamation markAgentBeep: exclamation sound
    agtI_ASTERISKThe "i" of informationAgentBeep: asterisk sound
    agtI_WARNINGExclamation markAgentBeep: exclamation sound
    agtI_ERRORExclamation markAgentBeep: exclamation sound
    agtI_INFORMATIONThe "i" of informationAgentBeep: asterisk sound
    agtI_STOPExclamation markAgentBeep: exclamation sound
  • The mode:
    agtMODALYESThe message is a modal message (the application is stopped)
    agtMODALNOThe message is not modal (the application continues to run)
Components
WINDEVReports and Queries wd160agt.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment