共用方式為


NotifyIcon.BalloonTipTitle 屬性

定義

取得或設定 NotifyIcon 上顯示的氣球提示標題。

public:
 property System::String ^ BalloonTipTitle { System::String ^ get(); void set(System::String ^ value); };
public string BalloonTipTitle { get; set; }
member this.BalloonTipTitle : string with get, set
Public Property BalloonTipTitle As String

屬性值

要顯示為氣球提示標題的文字。

範例

下列程式碼範例示範如何使用 BalloonTipTitleBalloonTipTextBalloonTipIcon 屬性。 若要執行此範例,請將範例程式碼貼到包含 NotifyIcon 具名 notifyIcon1 的 Windows Form 中。 從表單的建構函式或 Load 事件處理方法呼叫 SetBalloonTip

private void SetBalloonTip()
{
    notifyIcon1.Icon = SystemIcons.Exclamation;
    notifyIcon1.BalloonTipTitle = "Balloon Tip Title";
    notifyIcon1.BalloonTipText = "Balloon Tip Text.";
    notifyIcon1.BalloonTipIcon = ToolTipIcon.Error;
    this.Click += new EventHandler(Form1_Click);
}

void Form1_Click(object sender, EventArgs e) 
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(30000);
}
Private Sub SetBalloonTip()
    notifyIcon1.Icon = SystemIcons.Exclamation
    notifyIcon1.BalloonTipTitle = "Balloon Tip Title"
    notifyIcon1.BalloonTipText = "Balloon Tip Text."
    notifyIcon1.BalloonTipIcon = ToolTipIcon.Error

End Sub

Sub Form1_Click(ByVal sender As Object, ByVal e As EventArgs) _
    Handles Me.Click

    notifyIcon1.Visible = True
    notifyIcon1.ShowBalloonTip(30000)

End Sub

備註

標題文字會顯示在方塊頂端附近的粗體字型中。

適用於