Partager via


Notification.OnBalloonChanged Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Raises the BalloonChanged event.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

Syntax

'Declaration
Protected Overridable Sub OnBalloonChanged ( _
    e As BalloonChangedEventArgs _
)
'Usage
Dim e As BalloonChangedEventArgs

Me.OnBalloonChanged(e)
protected virtual void OnBalloonChanged(
    BalloonChangedEventArgs e
)
protected:
virtual void OnBalloonChanged(
    BalloonChangedEventArgs^ e
)
abstract OnBalloonChanged : 
        e:BalloonChangedEventArgs -> unit 
override OnBalloonChanged : 
        e:BalloonChangedEventArgs -> unit 

Parameters

Remarks

A BalloonChanged event occurs whenever a notification is displayed or hidden with the Visible property.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The OnBalloonChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnBalloonChanged in a derived class, be sure to call the base class’s OnBalloonChanged method so that registered delegates receive the event.

Examples

The following code example shows where to add code for adding functionality to an application when a balloon is visible. The BalloonChangedEventArgs class contains a Visible property that reflects the value of the Visible property of the Notification class. This code example is part of a larger example provided for the Notification class.

' You can use the BalloonChanged event
' created by tracking each time the notification is made visible.
Private Sub OnBalloonChanged(obj As Object, _
  balevent As BalloonChangedEventArgs) Handles Notification1.BalloonChanged
   If balevent.Visible = True Then
    ' You can add code here to add 
    ' functionality such as user interface 
    ' changes that should occur when
    ' the notification is displayed.
   End If
End Sub
// You can use the BalloonChanged event
// created by tracking each time the notification is made visible.
private void OnBalloonChanged(object obj, BalloonChangedEventArgs balevent)
{
    if (balevent.Visible == true)
    {
        // You can add code here to add 
        // functionality such as user interface 
        // changes that should occur when
        // the notification is displayed.
    }

}

.NET Framework Security

Platforms

Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Notification Class

Notification Members

Microsoft.WindowsCE.Forms Namespace