J
jm
I have a Form1 and two class files.
In the first class, I call the second class. The second class
references the Form1 notifyicon and changes the icon. It works.
The problems is, however, that because I am doing:
Form1 f = new Form1();
f.notifyIcon.Icon = myIcon;
everytime this second class method is called I get an extra icon in
the system tray. I realize this is because I am creating a new Form1
object with its own set of icons, etc.
My problem is that I do not know how to simply use the same Form1 that
I started out with, especially, since I started out on Form1, went to
class one, and then finally called something out of class two.
I know it is basic, sorry. Thank you for any help.
In the first class, I call the second class. The second class
references the Form1 notifyicon and changes the icon. It works.
The problems is, however, that because I am doing:
Form1 f = new Form1();
f.notifyIcon.Icon = myIcon;
everytime this second class method is called I get an extra icon in
the system tray. I realize this is because I am creating a new Form1
object with its own set of icons, etc.
My problem is that I do not know how to simply use the same Form1 that
I started out with, especially, since I started out on Form1, went to
class one, and then finally called something out of class two.
I know it is basic, sorry. Thank you for any help.