Add to right click application menu in taskbar in .NET
Question
Most applications only have "Restore, Move, Size, Minimize, Maximize and Close", however MS SQL offers extra options "Help, Customize view". Along those lines, is it possible to add to the right click menu of an application in the task bar?
Note: I'm not referring to an icon in the notification area next to the clock.
Solution
This article gives you a walk through in C#!
OTHER TIPS
This is a simpler answer I found. I quickly tested it and it works.
My code:
private const int WMTaskbarRClick = 0x0313;
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WMTaskbarRClick:
{
// Show your own context menu here, i do it like this
// there's a context menu present on my main form so i use it
MessageBox.Show("I see that.");
break;
}
default:
{
base.WndProc(ref m);
break;
}
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow