sdom100
asked on
Minimise to taskbar (WM6)
Hi,
I need my application to minimise to the taskbar, showing an icon - just like the native volume control does.
Could someone please provide me some c# code to do this please.
Thanks.
S.
I need my application to minimise to the taskbar, showing an icon - just like the native volume control does.
Could someone please provide me some c# code to do this please.
Thanks.
S.
Placing Your C# Application in the System Tray
http://www.codeguru.com/Csharp/.NET/net_general/tipstricks/article.php/c6933/
C# Tip: Placing Your C# Application in the System Tray
http://www.developer.com/net/csharp/article.php/3336751
http://www.codeguru.com/Csharp/.NET/net_general/tipstricks/article.php/c6933/
C# Tip: Placing Your C# Application in the System Tray
http://www.developer.com/net/csharp/article.php/3336751
ASKER
Thanks but unfortunately on Windows Mobile 6, there is no notify icon.
The closest it gets is a notification bubble but that's not quite the same.
The closest it gets is a notification bubble but that's not quite the same.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The article in Dhaest's answer does not put an icon on the taskbar but this is apparently banned in CE (officially anyway). The article is about as close as useful info gets to the answer - although it didnt work when I tried it :(
Add a Form_Resize event handler to the form.
private void Form1_Resize(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Minimized)
{
this.Visible = false;
notifyIcon1.Visible = true;
}
}
Then add an event handler to the NotifyIcon (usually double click) with this code:
this.Visible = true;
notifyIcon1.Visible = false;