Questions tagged [mousemove]

For issues relating to setting up, subscribing to, or handling mousemove events.

Mousemove is an event that fires when the user moves the mouse owithin the element you registered the event on.

961 questions
7
votes
5 answers

Prevent mouse from leaving my form

I've attached some MouseMove and MouseClick events to my program and next up is one of these: Get "global" mouse movement, so that I can read the mouse location even outside the form. Prevent my mouse from leaving the form in the first place. My…
user2032433
7
votes
1 answer

Change in mouse position when viewbox is added

I am currently learning and working in JavaScript and SVG and I am new to it. Here is my scenario I have a div which has an SVG inside it.
Now I want…
A_user
  • 2,087
  • 6
  • 25
  • 33
6
votes
2 answers

Mouse events not fired

I'm making a C# WinForms application. The MouseMove and MouseClick events of the form aren't getting fired for some reason. (I'm probably going to feel like an idiot when I find out why.) It is a transparent form (TransparencyKey is set to the…
Joshua Walsh
  • 1,915
  • 5
  • 25
  • 50
6
votes
4 answers

MouseMove event in PictureBox is fired continuously even if the mouse is not moved

Why does MouseMove event of a PictureBox seem to be fired continuously even if the mouse is not moved? I have tried the following codes to prove it (by simply creating a new form with a PictureBox and a Label on it). private void…
Setyo N
  • 1,953
  • 2
  • 26
  • 28
6
votes
1 answer

Dragging an element with mousemove handler stops tracking if mouse moves too quickly

I've set up a mousemove handler to drag an element. However, if you move the cursor too quickly, it loses track of the element and doesn't move it anymore until you bring your cursor back over the element. Here's a JSFiddle demo. Why does it do…
brentonstrine
  • 21,694
  • 25
  • 74
  • 120
6
votes
1 answer

Webkit and Safari fire mousemove even when mouse doesn't move

I've read about issues where the mousemove event is fired twice in Safari/Webkit, but the problem I'm facing is that mousemove fires even when the mouse is not moved. That is: it already fires when the mouse cursor is positioned above the context…
Roel
  • 335
  • 1
  • 3
  • 10
6
votes
3 answers

Simulating mouse movement (C#)

How would I go about making a small program that keeps moving the mouse upwards? For those who would like to know, tt's a tiny one-use thing. I'm playing Star Wars The Force Unleashed. In console versions, you would hold the right stick upwards. In…
Vivelin
  • 770
  • 1
  • 10
  • 23
6
votes
5 answers

How to capture mousemove events beneath child controls

I am trying to handle a mouseclick event on a particular form that should fire if the mouse cursor falls between a set of coordinates - lets say a square. I understand that if I had an empty form I could simply tie in to the mousemove event and off…
Grant
  • 11,138
  • 32
  • 94
  • 140
6
votes
1 answer

addEventListener mousemove on document ready

Newbie-question I suppose. The following code is part of a function that I call on document ready. It is intended to permanently return the values of the current mouse position whenever the mouse is moved. The odd thing that is happening: Moving…
Björn Reinhardt
  • 61
  • 1
  • 1
  • 2
6
votes
3 answers

document won't fire mousemove event if mousedown occurred in iframe

I have a same origin iframe. Mouse events in the iframe are triggered in the document like so: // this won't work $('iframe').contents().find('body').on('mousedown mouseup mousemove', function(e) { $(document).trigger(e); }); // this does…
user706474
  • 63
  • 1
  • 4
6
votes
1 answer

How to display coordinates and use ginput

I cannot seem to get my image to display the coordinates of my mouse cursor, and also use ginput to store points at the same time. I currently am trying the following: MriHotrod = imread('Image.bmp'); Fig = figure('Name','BobDole'),... …
Shinobii
  • 2,401
  • 5
  • 24
  • 39
6
votes
1 answer

Move mouse cursor without triggering a WM_MOUSEMOVE

I want to trap the mouse in the middle of the window (like in an FPS game) using SetCursorPos. The problem is that when I do, my window receives a WM_MOUSEMOVE -- which at best cancels out any movement that the user intended, and at worst enters a…
Rei Miyasaka
  • 7,007
  • 6
  • 42
  • 69
5
votes
3 answers

GoogleMaps loses mouseUp event if rectangle redrawn in mouseMove event

The following code sample has me baffled. It's the simplest version of a larger piece of code that I can use to demonstrate my problem. Basically I want the user to be able to draw a bounding box by holding down the mouse key and dragging it. If…
5
votes
2 answers

jQuery force mouse move and click

Demo: http://jsfiddle.net/thisizmonster/VRPDa/ Purpose: Mouse must move to button position (button position must auto calculate) Fire mouse click event How do it? Edited/Added Since everyone said I can't move mouse coordinate, I think its failed.…
Gereltod
  • 2,043
  • 8
  • 25
  • 39
5
votes
1 answer

Prevent WPF ListBox from selecting item under mouse when layout changes

If a WPF ListBox gets a MouseMove event while the mouse button is held down, it will change the listbox's selection. That is, if you click the mouse on item #1, and then drag over item #2, it will deselect item #1 and select item #2 instead. How can…
Joe White
  • 94,807
  • 60
  • 220
  • 330