Das ist richtig das ich über ein Contextmenu die Windows Form öffnen.
In dieser Form hat das ButtonEvent Click aber keinen Einfluss auf das bereits vorhandene Symbol.
Ich kann zwar natürlich eine neue Instanz der Klasse erstellen, was ich aber nicht will.
Tray-App Klasse:
public class MyNotifyIconApplication
{
private NotifyIcon notico; //Mein Icon
Form1 form1 = new Form1();
public MyNotifyIconApplication()
{
notico = new NotifyIcon()
}
void menu_Click(object sender, EventArgs e)
{
form1.ShowDialog();
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
StatusAbfragen();
}
private void button2_Click(object sender, EventArgs e)
{
/////Ändere SYMBOL der Tray-APP
}
}
Wie lässt sich ein Bezug zum Tray-Objekt herstellen ohne ein neues zu erzeugen?
Geht das denn überhaupt so einfach?