For my app I'm developing I'm creating a icon that will stay on the taskbar to show the notifications to the user and inside it the user will have options like: Exit, Open, Configure and etc, but I have no ideas how to do this.
I have been able to create the icon that will stay on the side of icons, for example sound and wi-fi, but by minimizing the program it disappears from the taskbar and only the icon remains.
My code:
private void FrmIntegracaoPrincipal_Load(object sender, EventArgs e)
{
/* Minimizando aplicação na bandeja do windows */
this.Visible = false;
this.ShowInTaskbar = false;
this.WindowState = FormWindowState.Minimized;
notifyIcon1.Visible = true;
}
private void notifyIcon1_Click(object sender, EventArgs e)
{
/* Exibindo novamente o programa */
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
notifyIcon1.Visible = false;
}
private void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Visible = false;
this.ShowInTaskbar = false;
this.WindowState = FormWindowState.Minimized;
notifyIcon1.Visible = true;
}
//Verificando se WindowsState == Minimized
if (this.WindowState == FormWindowState.Minimized)
{
//CODIGO
}
}
How can I do this? If anyone can help me, I appreciate it.