Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.
SalNumber AlertBox( SalString sMessage, SalString sTitle, SalNumber nFlags )
The AlertBox method shows a translated message to the user and returns the user's response.
Name | Description |
---|---|
SalString sMessage | Message text shown to the user. This parameter should be a translatable constant. |
String sTitle | Text to be included in the title of the message box shown. This parameter should be a translatable constant. There are five predefined constants to use for this parameter: Const.CAPTION_Critical, Const.CAPTION_Error, Const.CAPTION_Information, Const.CAPTION_Question, Const.CAPTION_Warning to use with this parameter. |
Number nFlags | Style of the message box that appears. This is a combination (using the Or (|) operator) for Sys.MB_* constants. There are some predefined combinations constants Const.CRITICAL_*, Const.WARNING_*, Const.INFO_*, and Const.QUESTION_* available for use with this parameter. |
The return value is Sys.IDABORT, Sys.IDCANCEL, Sys.IDIGNORE, Sys.IDNO, Sys.IDOK, Sys.IDRETRY or Sys.IDYES corresponding to the button the user pressed in response to the message.
This method does not support parameters in the message text. To show a message with parameters, use the AlertBoxWithParams method.
If AlertBox( TEXT_QuestionSave, CAPTION_Question, QUESTION_YesNo ) = ISYES Call SalPostMsg( i_hWndFrame, PM_DataSourceSave, METHOD_Execute, 0 )// Ask for confirmation if (Int.AlertBox("Initializing all packages may take a long time. Continue?",
Const.CAPTION_Question, Const.INFO_YesNo) == Sys.IDYES) { Sal.WaitCursor(true); DbPLSQLBlock(cSessionManager.c_hSql, "&AO.Database_SYS.Init_All_Packages_(1)"); Sal.WaitCursor(false); }