468,306 Members | 1,253 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Getting MouseUp-Event

Hello.

I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so it is
important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the mouse
outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?

What is the best solution for this scenario?
Thanks for any information!

Greetings,
Tim.
Nov 16 '05 #1
5 4307
Generally when I interact with a button that way it means I didn't want to
click where I did, so I don't want anything to happen. ...but that's just GUI
friendliness and my opinion and doesn't really help much does it?
I'm certainly no expert here but I would have though that you could catch
the event that the mouse has left the panel (VS.NET has that cool pane in the
form designer that lets you see all the events you can catch on an object and
will take you through adding and attaching the handler if you double click
one). If you catch this event while you know the mouse button is down you can
behave appropriately.

Aaron.

"Tim Bücker" wrote:
Hello.

I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so it is
important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the mouse
outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?

What is the best solution for this scenario?
Thanks for any information!

Greetings,
Tim.

Nov 16 '05 #2

"Tim Bücker" <ti*************@web.de> wrote in message
news:cl**********@news.uni-koblenz.de...
Hello.

I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so it
is
important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the
mouse
outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?

What is the best solution for this scenario?
Thanks for any information!

Greetings,
Tim.


I am not sure about a global mouse_up event but I am curious if you could
use the Mouse_Leave event to warn you that the user is leaving that panel?
Nov 16 '05 #3

"Tim Bücker" <ti*************@web.de> schrieb im Newsbeitrag
news:cl**********@news.uni-koblenz.de...
I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so it is important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the mouse outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?


Thanks for answering!
But unfortunately the Mouse_Leave event doesn´t help me!

Greetings,
Tim.
Nov 16 '05 #4
ok, how about restricting movement of the mouse? this is probably considered
a hack and bad practice for accessibility and security but it used to be
possible to stop the mouse leaving the boundaries of a certain control

just a suggestion :-)

"Tim Bücker" wrote:

"Tim Bücker" <ti*************@web.de> schrieb im Newsbeitrag
news:cl**********@news.uni-koblenz.de...
I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so it

is
important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the

mouse
outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?


Thanks for answering!
But unfortunately the Mouse_Leave event doesn´t help me!

Greetings,
Tim.

Nov 16 '05 #5
Thanks for all your ideas!
But for me it seems to be the best solution to hook the mouse:
http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/

Greetings and thanks,
Tim.

"Aaron Oxford" <Aa*********@discussions.microsoft.com> schrieb im
Newsbeitrag news:D2**********************************@microsof t.com...
ok, how about restricting movement of the mouse? this is probably considered a hack and bad practice for accessibility and security but it used to be
possible to stop the mouse leaving the boundaries of a certain control

just a suggestion :-)

"Tim Bücker" wrote:

"Tim Bücker" <ti*************@web.de> schrieb im Newsbeitrag
news:cl**********@news.uni-koblenz.de...
I have a window form with some panels on it.
In one panel I am using the OnMouseDown and OnMouseUp events.
MouseDown initiates some things and MouseUp releases some things - so
it is
important that I get both events!

Problem:
The user presses the mouse but than leaves the panel and releases the

mouse
outside this panel.
So this way I don´t get the needed OnMouseUp event.

Is there a way to get a "global" OnMouseUp event?


Thanks for answering!
But unfortunately the Mouse_Leave event doesn´t help me!

Greetings,
Tim.

Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jeremy Robertson | last post: by
7 posts views Thread by Sue & Bill | last post: by
1 post views Thread by Nathan Sokalski | last post: by
reply views Thread by rob willaar | last post: by
8 posts views Thread by Jon Slaughter | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.