add icon to nonclient area

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm sure there's been loads of posts (and answers) as to "how do I add a
system tray icon", but how can I add the sort of minimize button that looks
slightly different and sits alongside the existing minimize button, that is
(fairly obviously) intended to send the app to the system tray, whereas the
normal minimize icon just minimizes it. If you want an example, emule has got
one.

How can I do this in C#?
 
Bonj,

You would have to override the handler for the WM_NCPAINT message in
your application by overriding the WndProc method. When handling it, you
would call the base class implementation (so that the client frame is
drawn), and then paint the button. You would also have to handle other
things as well, such as when the button is clicked, moved over, etc, etc.
To get these events, check out the WM_NC* messages, as they will handle the
events in that area.

Hope this helps.
 
Back
Top