共用方式為


Notification.BalloonChanged 事件

顯示或隱藏訊息提示時發生。

命名空間:  Microsoft.WindowsCE.Forms
組件:  Microsoft.WindowsCE.Forms (在 Microsoft.WindowsCE.Forms.dll 中)

語法

'宣告
Public Event BalloonChanged As BalloonChangedEventHandler
'用途
Dim instance As Notification
Dim handler As BalloonChangedEventHandler

AddHandler instance.BalloonChanged, handler
public event BalloonChangedEventHandler BalloonChanged
public:
 event BalloonChangedEventHandler^ BalloonChanged {
    void add (BalloonChangedEventHandler^ value);
    void remove (BalloonChangedEventHandler^ value);
}
JScript 不支援事件。

備註

只要設定 Visible 屬性,就會發生此事件。

如需處理事件的詳細資訊,請參閱使用事件

範例

下列程式碼範例示範使用此事件來判斷建立告知的時間。這個程式碼範例是 Notification 類別完整範例的一部分。

' 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.
    }

}

使用權限

平台

Windows Mobile for Pocket PC

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Compact Framework

支援版本:3.5、2.0

請參閱

參考

Notification 類別

Notification 成員

Microsoft.WindowsCE.Forms 命名空間