This question is different from others because I've already tried their solutions:
visible=true
;- balloon tips also don't show;
- and it's not in the "extended icons" section of the system tray (or whatever that's called where hidden icons go).
The code, taken from a number of different answers across SO and other places (they all say the same):
private void mainform_Resize(object sender, EventArgs e)
{
if (FormWindowState.Minimized == this.WindowState)
{
notifyIcon.Visible = true;
notifyIcon.ShowBalloonTip(500, "test title", "test message", ToolTipIcon.Info);
this.Hide();
}
else if (FormWindowState.Normal == this.WindowState)
{
notifyIcon.Visible = false;
}
}
Expected result: icon shows in system tray. Actual result: nothing happens, only the window disappears as per this.Hide();
.