HIRO's.NET

VB.NET, C#, PowerShell Tipsサイト

 VB.NET, C#, PowerShellを使用しているエンジニアのためのサイト。

 基本的な使用方法から開発で役立つTipsまで幅広く取り扱っています。

HIRO's.NET RSSHIRO's.NET RSS


VB.NET 2005の開発でお困りのことはありませんか?
そんな悩みは当サイトで解決!!

HOME > VB.NET 2005 Tips > コントロール > NotifyIcon Tips メニュー

05.バルーンツールチップを表示する

UPDATE:2006/09/26 

<< 前のTips  次のTips >>

 

 バルーンツールチップを表示するには、ShowBalloonTipメソッドを使用します。

 第1引数には表示する時間(単位ミリ秒)、第2引数にはバルーンチップタイトル、第3引数にはメッセージを指定します。

ToolTipIcon列挙対

メンバ名 説明
Error エラーアイコン
Info 情報アイコン
None 標準でないアイコン
Warning 警告アイコン


 
サンプル
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    NotifyIcon1.Visible = True
    NotifyIcon1.ShowBalloonTip(2000, "Error", "This is the text", ToolTipIcon.Error)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    NotifyIcon1.Visible = True
    NotifyIcon1.ShowBalloonTip(2000, "Info", "This is the text", ToolTipIcon.Info)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    NotifyIcon1.Visible = True
    NotifyIcon1.ShowBalloonTip(2000, "None", "This is the text", ToolTipIcon.None)
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    NotifyIcon1.Visible = True
    NotifyIcon1.ShowBalloonTip(2000, "Warning", "This is the text", ToolTipIcon.Warning)
End Sub
 

<< 前のTips  次のTips >>