my app was working ok and it would execute on startup before. I added a notify icon and in my code,there are some places that this icon changes.I added all required icons in the root folder of my app,and everything is working fine with the icons,except the startup boot of my app. I can see my app's address in the "run" part of the registry(I mean everything is the same as when my app booted at startup properly).but my app won't run at startup anymore. any advice on my matter? PS:I thought I should explain my work a little bit and I wrote a little piece of app that has the exact same problem
public Icon[] icons = new Icon[2] { new Icon("icon1.ico"), new Icon("icon2.ico") };
public int counter = 0;
private void button1_Click(object sender, EventArgs e)
{
notifyIcon1.Visible = true;
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
counter %= 2;
notifyIcon1.Icon = icons[counter];
counter++;
As you can see,the app changes the icon of the notifyicon in every tick.with this code,the app won't run at startup.but if I remove the iconchanging feature of the app,it will actually run at startup