HIRO's.NET

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

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

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

HIRO's.NET RSSHIRO's.NET RSS


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

HOME > C# 2005 Tips > コントロール > NotifyIcon Tips メニュー

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

UPDATE:2006/09/26 

<< 前のTips  次のTips >>

 

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

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

ToolTipIcon列挙対

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


 
サンプル
private void button1_Click(object sender, EventArgs e)
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(2000, "Error", "This is the text", ToolTipIcon.Error);
}

private void button2_Click(object sender, EventArgs e)
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(2000, "Info", "This is the text", ToolTipIcon.Info);
}

private void button3_Click(object sender, EventArgs e)
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(2000, "None", "This is the text", ToolTipIcon.None);
}

private void button4_Click(object sender, EventArgs e)
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(2000, "Warning", "This is the text", ToolTipIcon.Warning);
}
 

<< 前のTips  次のTips >>