C# 图标更改在调试时起作用,在直接启动exe时不起作用
我有一个小计时器应用程序,我需要在它的图标中显示当前分钟。所以我画了几个图标,把它们放到参考资料文件中。 更改图标的代码C# 图标更改在调试时起作用,在直接启动exe时不起作用,c#,icons,C#,Icons,我有一个小计时器应用程序,我需要在它的图标中显示当前分钟。所以我画了几个图标,把它们放到参考资料文件中。 更改图标的代码 int currentMinute = Int32.Parse(label1.Text[0].ToString()); if (currentMinute != globals.currentIcon) { ResourceManager rm = new ResourceManager("PoE7MinTimer
int currentMinute = Int32.Parse(label1.Text[0].ToString());
if (currentMinute != globals.currentIcon)
{
ResourceManager rm = new ResourceManager("PoE7MinTimerLolz.Properties.Resources", Assembly.GetExecutingAssembly());
this.Icon = (Icon)rm.GetObject("_" + currentMinute);
globals.currentIcon = currentMinute;
}
当我调试应用程序时,它可以完美地工作
但当我从编译的exe文件启动它时,图标并没有从默认值更改
我做错了什么