可能重复:
remove application icon from the taskbar using .net with c#应用程序图标显示
我加入窗口申请表图标使用此代码
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窗体应用程序initilizaion方法。它的工作原理,但问题是,我正在windows7中使用具有管理员权限的Windows服务运行Windows窗体EXE。
在Windows重新启动不添加图标显示为Windows窗体应用程序,但是当我重新启动我的Windows服务时,它工作正常。 这里有什么问题?