Notification
Previous  Next

You can create notifications and then display them as needed using the Visible property. The InitialDuration property sets the time the message balloon initially displays. If you set InitialDuration to zero and Visible to true, the message balloon does not appear but its' icon is available in the title bar for reactivation when clicked. The BalloonChanged event occurs whenever the balloon is shown or hidden, either programmatically using the Visible property or through user interaction.

In addition to plain text, you can create a user notification with HTML content in the message balloon. The HTML is rendered for display and a ResponseSubmitted  event is raised when a user selects a value in the displayed HTML. The text can be plain text or HTML. The following elements are unsupported and ignored: BGSOUND tag, images, meta tags and script. You can respond to user input to HTML by parsing a response string provided by the Response property. The identifier "cmd:2" has a special purpose in Windows CE and is used to dismiss notifications. If cmd:2 is the name of an HTML button or other element in a message balloon, the ResponseSubmitted event is not raised. The notification is dismissed, but its icon is placed on the title bar to be responded to at a later time.


Methods

Dispose : Disposes of the Notification

New1 : Creates a new Notification.


Properties

Caption : String[I/O] : Sets or gets the caption of the notification.

Critical : Boolean [I/)] : Sets or gets the critical property of the notification. This is displays a critical notification, normally with a red background but different themes may change that. Set this property before setting Visible to True. This property appears to be reset to false when Visible is made False.

Icon : Icon [I/O] : Sets or gets the icon displayed in the notification area. As Basic4PPC cannot handle icons they need to be added to an IconList before being assigned to this property. e.g. "notifier.Icon = IconList1.Item(0)"

InitialDuration : Int32 [I/O] : Sets or gets the initial duration for which the balloon is displayed when first made visible. 

Response : String [I/O] : Gets or sets the string returned when a user selects a value in HTML content in the notification bubble.

DLLVersion : Double [I] : Gets the version number of this library.

Text : String[I/O] : Sets or gets the text of the notification.

Visible: Boolean [I/)] : Sets or gets the visibility of the notification. Setting this True on the desktop this will cause a message box to be displayed in an effort to mimic the appearance of the notification ballon on the device, this will need user cancellation. Setting either Visible to either True or False will cause the BalloonChanged event to be fired on both device and desktop.


Events

BalloonChanged : Occurs when the visibility of the notification balloon changes. It might be thought that this can be used to determine whether the balloon is visible or not but in fact the Visible property refers to whether the notification icon is visible so in practice is always True when this event occurs. If the balloon visibility is required then it will need to be tracked independently.

ResponseSubmitted : Occurs when a user selects a value in HTML content in the notification bubble.