I'm working on a C# Windows Forms application with multiple forms and a tray icon.
When my application starts, it adds a tray icon to systemtray, if i show a subform using .ShowDialog I get a new Instance of my application with a second tray Icon. Here is my code to show the subform:
btnEditor_Click(object sender, EventArgs e)
{
CSV_Editor editor = new CSV_Editor(listEntrys,conf);
editor.ShowDialog();
}
Both forms are winforms and only the mainform has a trayicon.
How to avoid getting two Icons?
Thanks for your help!