I cant use events for the Problem i got.
Its kinda hard to explain why, but i'll try:
My goal is to add a "Minimize to Tray"-Button to the caption bar (near
the minimize button)
This button should behave exactly the same like the others do.
So if I press (not click) the left mouse button at the traybutton, it
should get the pressed graphics. If I then move the mouse (and keep
pressing the left mouse button) outside of the button it should get the
unpressed graphic and when I move the mouse inside the button again it
should also get the pressed graphics again.
I don't think I can handle this with events. This has to be done in the
WM_NCMOUSEMOVE Notification (and this notification doesn't contain any
information about the mouse button states like WM_MOUSEMOVE does).
Hello Tyron,
You can do that using the MouseDown event, just handle the event and
inside the event handler use something like
if (e.Button == MouseButtons.Right)
{
//right click
} else if (e.Button == MouseButtons.Left) {
//left click
}
Martin.
I need to know if the Left Button of the Mouse is clicked in the
WM_NCMOUSEMOVE Notification but this Message doesnt
contain the Mouse Button States as WM_MOUSEMOVE does.
So how can I get them?
Thanks