set errmsg(message_styleʃ,close_messageʅʃ,close_keystrokeʅ);
CSPro data entry applications have two operating modes:
operator- and system-controlled modes. Each mode has a different style error message box. System-controlled mode uses a standard Windows dialog box whereas operator-controlled mode uses a customized yellow box. The
set errmsg statement allows the user to choose which kind of box to use. The first argument,
message_style, is one of the following:
- default: Reset the box to the default style for the data entry mode.
- operator: Use the operator-controlled box.
- system: Use the system-controlled box.
For operator-controlled message boxes, the optional string expression
close_message allows you to modify the text that appears beneath the error message, which by default is "Press F8 to clear." Another optional argument, the numeric expression
close_keystroke, modifies
the keystroke required to close the box.
Calls to this function are ignored when executed on mobile devices.
set errmsg(system); // use the system-controlled style
set errmsg(operator); // use the operator-controlled style
set errmsg(default); // use the default style for the data entry mode
// defines the error message and defaults to F8 to close the box
set errmsg(operator,"Appuyez sur F8 pour fermer");
// 67 (C) is the key that will close the box
set errmsg(operator,"Appuyez sur C pour fermer",67);
// 67 (C) is the key that will close the box
// but the default error message text is used
set errmsg(operator,67);