0

わかりました、C# はまったく初めてですが、問題なく使用できています。

システム トレイに最小化されたアプリケーションがあり、これを行うためにWPF NotifyIconを使用しています。組み込みのバブル チップ機能を使用しようとしています。

エラーはありませんが、機能していないようです。

私のコードは次のとおりです。

    private void OnTaskBarMenuItemExitClick(object sender, RoutedEventArgs e)
    {
        m_isExplicitClose = true;//Set this to unclock the Minimize on close 

        this.Close();

        string title = "WPF NotifyIcon";
        string text = "This is a standard balloon";

        TaskBar.ShowBalloonTip(title, text, Properties.Resources.Server);
    }

アプリケーションを閉じると、アプリケーションがシステム トレイに非表示になります (そして表示されます) が、BalloonTip もポップアップ表示されます (表示されません)。

何か案は; 私は困惑していますか?:(

4

2 に答える 2

0
private void OnTaskBarMenuItemExitClick(object sender, RoutedEventArgs e)
{
    m_isExplicitClose = true;//Set this to unclock the Minimize on close 

    this.Hide();

    string title = "WPF NotifyIcon";
    string text = "This is a standard balloon";

    TaskBar.ShowBalloonTip(title, text, Properties.Resources.Server);
}

check out this link: http://www.techotopia.com/index.php/Hiding_and_Showing_Forms_in_C_Sharp

于 2014-09-22T10:30:57.583 に答える