このコードを使用して、タスクバーにウィンドウ アプリケーション フォーム アイコンを追加しています
ResourceManager resManager = new ResourceManager("SMSLAgent.Properties.Resources", GetType().Module.Assembly);
notifyicon.Icon = (Icon)resManager.GetObject("SMSLAgent");
notifyicon.Visible = true;
notifyicon.Text = "PA Agent";
this.Hide();
this.ShowInTaskbar = false;
this.SetVisibleCore(false);
このコードは、asp.net Windows フォーム アプリケーションの初期化メソッドに追加されます。それは機能しますが、問題は、windows7で管理者権限を持つwindowsサービスを使用してwindows form exeを実行していることです。
Windows を再起動すると、Windows フォーム アプリケーションとして表示されるアイコンが追加されませんが、Windows サービスを再起動すると正常に動作します。ここで何が問題なのですか?