The Shell_DisplayNotification() function causes a notification to be displayed in the lower-right corner of the display. Notifications can be used only when the SDI shell is being used for the application.
Shell_DisplayNotification(style, image_dict_ID, image_type, image_res_ID, subject, message, dex_link)
• style – An integer specifying the style used for the notification. The value corresponds to one of the following constants:
Constant |
Display timing |
---|---|
NOTIFICATION_STYLE_INFO |
15 seconds |
NOTIFICATION_STYLE_SUCCESS |
15 seconds |
NOTIFICATION_STYLE_FAILURE |
15 seconds with a single display. 20 seconds when the system has multiple displays. |
NOTIFICATION_STYLE_SYSEVENT |
15 seconds with a single display. 20 seconds when the system has multiple displays. |
NOTIFICATION_STYLE_USERINTERACTION |
15 seconds with a single display. 20 seconds when the system has multiple displays. |
• image_dict_ID – An integer specifying the ID of the dictionary containing the image to display for the notification.
• image_type – An integer specifying the type of image to use for the notification. Use the constant DT_METAFILE to specify that native pictures will be used.
• image_res_ID – An integer specifying the resource ID of the image to display for the notification.
• subject – A string containing the subject line to display for the notification.
• message – A string or text value containing the text to display for the notification.
• dex_link – A string containing the link that indicates the action to be performed when the user clicks on the notification. The action is not performed if the user clicks the close box in the notification. If no action is to be performed, set this parameter to the empty string ("").
A boolean. The value true indicates the notification was successfully displayed, while false indicates it was not.
The following illustration shows a notification displayed for the user.
When there is user activity in the application, or the application is running in the background, the notification will be displayed for the period indicated for the notification style before it is automatically dismissed. If the application is running in the foreground, but there is no user activity, the notification will remain open until there is activity.
If multiple notifications are opened at once, they will be stacked vertically. Try to keep the number of notifications displayed at once to three or fewer.
The string for the link specifies the procedure or form-level procedure to be run when the user clicks the notification. The following syntax is used to execute a global procedure when the notification is clicked:
http://dexterity/product=prod_ID/script=procedure/args=arg_val
The following syntax is used to execute a form-level procedure when the notification is clicked:
http://dexterity/product=prod_ID/script=procedure/form=form/args=arg_val
The prod_ID is the dictionary ID of the product that contains the procedure to be run. The procedure value specifies the procedure to be run. The form value is supplied to specify the form the form-level procedure to be run is defined for. The arg_val is used to pass an integer value or string value to the procedure being run. If an argument is to be passed from the notification, the procedure being run must have an “in” parameter of type integer or string to receive the value. If a string value is passed, the value must be enclosed in single quotes. (''). If no argument is passed, it can be omitted from the link string.