473,231 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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 4520
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
1
by: Jeremy Robertson | last post by:
I'm working on an application that manages large image files (mulit-page ..Tiff's to be exact some 1000+ pages). I've written an user control that displays a number of the images as thumbnails...
7
by: Sue & Bill | last post by:
Does a double click action also generate two MouseUp events? If so, what is a good method in my MouseUp event handler to detect that a MouseUp is part of a double click action? Thanks in...
1
by: Nathan Sokalski | last post by:
I want to create a pushbutton-like control on my webform that has an image on it. I used to think that this is what the ImageButton control was, but it seems to me that the ImageButton is nothing...
4
by: Colin McGuire | last post by:
Hi again, thanks everyone for your previous help. But having resolved past problems, I'm moving on to new problems :( This one is a simple winforms application with two buttons, named Button1...
0
by: rob willaar | last post by:
I use the treeview to open a new form but the treeview reclaims focus after MouseUp Any solutions to this problem?
0
by: Si | last post by:
I'm writing an HttpModule to intecept web method calls and retrieve custom authentication information from their SOAP headers. I have the httpModules tag in web.config and that appears to be...
3
by: dei3cmix | last post by:
Hey, I am having a problem with a program I am working on. Basically, the first part of the program gets input from a file using cin.getline. Then the second part, (still in the same main as the...
8
by: Jon Slaughter | last post by:
if I call javascript like <a href="javascript:;" onmousedown="toggle('a');">O</a> is there a way to pass the element a to the function without specifying any tags or names? I want the...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.