mouse

Increase Cursor Size on Entire Desktop

久未见 提交于 2019-12-02 17:42:20
问题 First of all, please put aside notions of "Your application shouldn't do this". This is exactly what the people purchasing this software will be expecting. How can I, system-wide, increase the size of the mouse cursor? I'd have to increase all mouse cursors too, so I don't think SetCursor would do the trick, at least not in any nice, clean way. And I can't use the Form's Cursor Size as detailed here, as this would only affect the cursor when it's active on the form. I see that there are

Keyboard / Mouse input in C++

对着背影说爱祢 提交于 2019-12-02 17:21:30
I'm wondering how to accept keyboard and mouse input in C++, using Visual Studio 2010, for Windows 7 32-bit. --EDIT: I forgot to mention that I need keyboard / mouse input without interrupting the flow of the program. Something like a listener. I don't want to have to pause the program and ask for input, and then have the user type it out and press enter. What I'm looking for is more like: If user presses W, S, A, D -> something happens. Or: If user presses leftmousebutton in -> something happens. I have to mention that I'm still very new to programming as a whole. I know basic OOP programming

GetMouseMovePointsEx: Bounds / MOUSEMOVEPOINT in (mp_in) problems

陌路散爱 提交于 2019-12-02 17:14:52
问题 I'm trying to calculate cursor acceleration / velocity. I read Find the velocity of the mouse in C# and decided to take Hans's suggestion of using GetMouseMovePointsEx (pinvoke.net, MSDN). I made a demo program to test it out (see full code below) but it has a big limitation. It won't return points once the cursor leaves the window. In fact, the function returns -1 (win32Exception 1171, "The point passed to GetMouseMovePoints is not in the buffer") if execution isn't limited to points within

I want to create an invisible clickable object over an image in Java

孤人 提交于 2019-12-02 15:42:57
问题 So I'm creating a game in Java in which the user clicks on an image that's different from the rest. I've already got the images for the level created, but I just want to make it so that if the user clicks on a specific spot on the image, the game will react in moving on to the next image. (All of the images are placed in an array already.) The game is set up so that it opens with the first image already. Here's my code: package Final; import java.awt.event.ActionListener; import java.awt

Change the mouse cursor on mouse over to anchor-like style

。_饼干妹妹 提交于 2019-12-02 14:20:27
If I hover the mouse over a div the mouse cursor will be changed to the cursor like that in HTML anchor. How can I do this? Do I need Javascript or it's possible with CSS only? Assuming your div has an id="myDiv" , add the following to your CSS. The cursor: pointer specifies that the cursor should be the same hand icon that is use for anchors (hyperlinks): CSS to Add #myDiv { cursor: pointer; } You can simply add the cursor style to your div 's HTML like this: <div style="cursor: pointer"> </div> EDIT: If you are determined to use jQuery for this, then add the following line to your $(document

Mouse moves too fast to capture events

不想你离开。 提交于 2019-12-02 12:56:13
问题 this is related to: a previous question BUT the question is my code only fails when i move the mouse really really fast over and around the TableLayoutPanel. is it possible that C# or windows are reporting/triggering events out of order due to the fast mouse movement? if so, how do i correct it? thank you. i hope this is not considered double posting. if so, apologies. 回答1: Mouse does not report its position by every pixel it passes, there are 20ms intervals between reports. If you manage to

Getting point on y=0 plane from mouse coordinates without using OpenGL calls

≯℡__Kan透↙ 提交于 2019-12-02 12:39:00
I have: screen coordinates x,y (0,0 being the middle of the screen, 1,1 being top left) screen dimensions camera location vector camera look vector projection matrix ModelView matrix y=0 Plane normal of (0,1,0,0) y=0 plane location of (0,0,0,0) And am looking to get the location (x,0,z) on the y=0 plane of where i click on my window (should be a line - plane intersection, but has to take into account the camera properties). Annoyingly, I don't have the access to the GLU calls for unprojecting and the like. Just basic vector and matrix calculations. I don't really need the exact code as such,

Javascript - Track mouse position within video

拥有回忆 提交于 2019-12-02 12:08:09
问题 Is it possible to track mouse position within a video that is playing? I want to make this video with video.js and i want to save the location of the mouse within the video. For example based on ratio of the video - or something similar to detect when the mouse is over left part of the video, right top bottom -- basically a location x y. In the same time i might need a solution to convert this location x y if i run this video on a different size. Thanks a lot for your help. George 回答1: You

I want to create an invisible clickable object over an image in Java

你离开我真会死。 提交于 2019-12-02 10:27:14
So I'm creating a game in Java in which the user clicks on an image that's different from the rest. I've already got the images for the level created, but I just want to make it so that if the user clicks on a specific spot on the image, the game will react in moving on to the next image. (All of the images are placed in an array already.) The game is set up so that it opens with the first image already. Here's my code: package Final; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.*; import javax.swing.JFrame; public

Increase Cursor Size on Entire Desktop

て烟熏妆下的殇ゞ 提交于 2019-12-02 09:50:32
First of all, please put aside notions of "Your application shouldn't do this". This is exactly what the people purchasing this software will be expecting. How can I, system-wide, increase the size of the mouse cursor? I'd have to increase all mouse cursors too, so I don't think SetCursor would do the trick, at least not in any nice, clean way. And I can't use the Form's Cursor Size as detailed here , as this would only affect the cursor when it's active on the form. I see that there are "Extra Large" Mouse Cursors available in Windows' Ease-of-Access Centre, so there must be a way... Any