I am developing an application that starts minimized and shown at system tray with a notify icon.
When application is running and I minimize it, form runs the Hide() method in Resize event to hide the window and it works (window is hidden from taskbar and shown the notify icon at system tray) . The problem is when the application is starting up. It is configured to run minimized.
When it starts up, the system tray icon appears and the window appears minimized, but it is shown in taskbar.
What is the problem?
This is the Resize event:
private void frmMain_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
Hide();
notifyIcon.Visible = true;
notifyIcon.ShowBalloonTip(200);
}
}
this.Hide();
– sujith karivelilShowOnTaskbar
tofalse
– Nino