code_junkie

Add to right click application menu in taskbar in .NET

Nov 11th, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. private const int WMTaskbarRClick = 0x0313;
  2. protected override void WndProc(ref Message m)
  3. {
  4. switch (m.Msg)
  5. {
  6. case WMTaskbarRClick:
  7. {
  8. // Show your own context menu here, i do it like this
  9. // there's a context menu present on my main form so i use it
  10.  
  11. MessageBox.Show("I see that.");
  12.  
  13. break;
  14. }
  15. default:
  16. {
  17. base.WndProc(ref m);
  18. break;
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment