Questions tagged [mouse-position]

197 questions
0
votes
0 answers

background color changing with mouse position between 2 RGB colors

I'm using on my website a JS to change the background color depending on the mouse position. here is the JS : $(document).mousemove(function(e){ var $width = ($(document).width())/255; var $height = ($(document).height())/255; var $pageX…
mmdwc
  • 1,095
  • 6
  • 27
  • 53
0
votes
1 answer

Show mousepoint while doing drag and drop in WPF

I am using Lesters DragAndDropManager to get the drag and drop function in my application and i really like the way it's implemented, but I have one small problem and that is that I want to show the mouse cordination during the drag in my…
Magnus Gladh
  • 1,817
  • 4
  • 20
  • 31
0
votes
1 answer

Mouse events QT

I want to to allow user to select a region with mouse, like you can do mostly everywhere.For more clarity just imagine your desktop on Windows, and click the left button and move the mouse with the button holed. The following will happen: you will…
Mike
  • 563
  • 5
  • 15
  • 32
0
votes
1 answer

If MousePosition is overhoving "X" control then

How I can know if the mouseposition is inside a margin? I mean for example I have a TrackBar control in my form then I want to know if the mouseposition is overhoving that control. private some sub()... if not mouseposition is over MyTrackbar…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
0
votes
0 answers

kineticjs rotate to mouseposition

Im trying to tween to mouseposition but it does not focus the mouse. It goes to the side. Anybody sees the failure? function tweenRotate2(layer) { for(var n = 0; n < layer.getChildren().length; n++) { var shape =…
koyotee
  • 45
  • 8
0
votes
1 answer

Retrieve mouse position within function with additional arguments

Basic question: I have a function with more than one argument. How can I retrieve the mouse position from inside that function? Here is some code to clarify what I mean. $(element).on("mousedown",checkDragDropEdit); function checkDragDropEdit() { …
tricon
  • 313
  • 4
  • 18
0
votes
1 answer

Kinetic Js touch mouseposition

I try to move a circle to mouseposition on an ipad with this code: function CircleMovetoMouse(){ var mousePos = stage.getMousePosition(); var xpos = mousePos.x; var ypos = mousePos.y ; var circle1 =…
koyotee
  • 45
  • 8
0
votes
2 answers

Java Mouse Position couting area that was scrolled

I didnt know how to make a good title for this.. but here we go: I am trying to get the accurate mouse position when I click on a label, using a MouseAdapter I added to my the JViewPort of the JScrollPane My panel itself is added inside the…
TiagoM
  • 3,458
  • 4
  • 42
  • 83
0
votes
3 answers

kineticjs rotate with mouse angle

I am trying to make an image object rotate in accordance to the mouse being clicked down on that image and the angle of the mouse to the center of the object. Think of a unit circle and having the image being rotated about the circle based on where…
kevindstanley
  • 15
  • 1
  • 3
0
votes
1 answer

How would I update mouse position in ToolStripStatusLabel

Possible Duplicate: How to track mouse X/Y position and print it to a label? I seem to have run into a road bump with what seems to be a small problem but can't seem to find the answer. This is my first question asked here, and I apologize if I…
Ryan Taite
  • 789
  • 12
  • 37
0
votes
1 answer

Div opacity or width related to mouse position

I'm working on a VFX portfolio site. I've used event listeners to (almost) synchronize three videos. The plan is to put the three video-divs on top of each other, and then have video1 be visible to the left of the mouse position, video2 to be…
-1
votes
2 answers

How to show live mouse position on tkinter window

i would like to know if there was a way to keep showing the live mouse position on a tkinter window. I know how to find mouse coordinates. x, y = win32api.GetCursorPos() mousecords = Label(self.root, text='x : ' + str(x) + ', y : ' +…
PradMaster
  • 83
  • 10
-1
votes
1 answer

Screen coordinates for cursor never close to 0

I am using the user32.dll function GetCursorPos to get the SCREEN coordinates of my cursor. I need to know if the cursor is at the top of the screen (with multiple monitor setups included). However, when I try to test for the Y coordinate that…
-1
votes
2 answers

How can I get a Javascript Canvas to return x and y mouse positions?

My goal is get live updating input from x and y position of my mouse. The y position works great, but when I went to add in the x position, I can't get anything but 'NaN'. Why isn't this working for the X position as well? Is this not how to pass…
-1
votes
1 answer

If Rectangle doesn't Contains Mouse Position

I have a Rectangle which I can touch with this command below. if ((mouse.LeftButton == ButtonState.Pressed )&& TextureRectangle.Contains((int)MousePos.X,(int)MousePos.Y)) { // Action; } But is there a Command like "Not Contains", so I…
1 2 3
13
14