Questions tagged [mouse-position]

197 questions
1
vote
3 answers

How to get mouse pointer location relative to frame

I want to get mouse location relative to the frame. MouseInfo give me the absolute location. How to get poisition relative to the frame? tahnks.
iLoveC
  • 97
  • 6
  • 12
0
votes
0 answers

jquery datatable and mouse position

I'm using datatable plugin and when the mousemove happen in some element, the coordination of the mouse are relatives to before the datatable was rendered. How can I get the current position considering the rendered table?
Frederico Schardong
  • 1,946
  • 6
  • 38
  • 62
0
votes
0 answers

store the mouse position data into mongodb

// // add mouse cursor position. var mouse_cord = [] let handleMousemove = (event) => { mouse_cord.append((event.x, event.y)); }; let throttle = (func, delay) => { let prev = Date.now() - delay; return (...args) => { let current =…
0
votes
1 answer

How can I change the mouse position so that an installed low-level mousehook is invoked

I installed a low-level mousehook (WH_MOUSE_LL) to get the correct screen cursor position on a mixed HiDpi system (two monitors) (the application itself is not HiDpi aware). How can I change the mouse position in code so that the hook is called as…
AWirthK2
  • 46
  • 2
0
votes
1 answer

how to get the mouse position in assembly

here is a part of my code, this should draw a pixel on the mouse position: mov ax,3h ;set interruption to getting the mouse pos int 33h ;after the interruption: cx=x, dx=y mov ah, 0Ch ;draw a pixel ;the x and y should already be…
plsHelpMe
  • 15
  • 6
0
votes
0 answers

Vim: set mouse to current cursor position

I use vim with the option set mouse=a so I can move the vim cursor quickly by pointing and clicking (preferably with my laptop keyboard trackpoint). However, I sometimes also use vim keys to set the cursor (e.g. to another split window). Because of…
0
votes
1 answer

My code does not return the proper coordinates for the cursor

I am trying to write a program that needs to move a picture box to the coordinates of the cursor on a mouse down event in windows forms app C#. private void MouseClick(object sender, MouseEventArgs e) { //left mouse button…
0
votes
1 answer

How to make element movement more responsive using e.clientX and e.clientY

I am making a microphone element that becomes moveable around the document when the user holds click on it. For this I created this function: microphoneButton.addEventListener('mousedown', () => { mouseIsDown = true; …
0
votes
1 answer

how to determine the mouse pointer is on tablelayoutpanel cell border c#

I have TableLayoutPanel on windows form. I want mouse pointer cursor style is cross when the pointer on/near the cell border. Edit I tried with mouse move event. I get the cell positions where the mouse point is moving.But I couldn't use this…
Gokhan
  • 453
  • 4
  • 10
0
votes
1 answer

How to make bullet launcher point in mouse position? Canvas JavaScript

When the mouse moves it doesn't point in the mouseX or mouseY direction. The current method points and rotates at the top right point slightly offset on the canvas. All the other SO questions didn't work for this specific game. I would prefer the…
Pete21
  • 102
  • 11
0
votes
1 answer

How do I instantiate a Unity prefab at the mouse's position in C#?

I'm trying to instantiate my ballPrefab on click at the cursor's position. I know that Input.mousePosition only takes the x and y coordinates. However, my camera looks in the direction of x (global) (as you can see here). So I changed x to 0. The…
0
votes
1 answer

Event copy/paste on mouse position

I am trying to copy/paste the block on the mouse position but it pastes on (0,0) position each time $(document).keydown(function(e){ if (e.keyCode == ctrlKey || e.keyCode == cmdKey) ctrlDown = true; if (ctrlDown && e.keyCode ==…
VictorMC
  • 9
  • 2
0
votes
0 answers

How do you make a Sprite Rotate to where your cursor is?

I'm quite stupid, and I'm making a small pygame game that requires the player to move and rotate towards the mouse, one in a confined or unconfined area. For, now, just give the solution for the rotation, and if you can solve the other part, Thanks…
0
votes
0 answers

I have a problem with mouse pointer in Visual Studio Preview 2022 for mac on MacBook Air m1

My cursor all the time looks like the Insert key is pressed and I can’t find the reason for this and how to fix it. I tried it on another macbook and everything is OK there is no such problem, the pointer looks normal. This creates a problem because…
0
votes
0 answers

How to get Mouse Position as pixel number in the text boxes

I am working on real-time video processing project. During the real-time video i need to get mouse position when left clicked. To do that i have one button to send mouse position to text boxes. To see position of the cursor, i have two text boxes…
user20256782