mousemove

MouseMove event repeating every second

六月ゝ 毕业季﹏ 提交于 2019-11-30 07:08:18
http://jsfiddle.net/MrkY9/ My computer (and so far, no other computer among my coworkers) is exhibiting an issue in Chrome, IE, and Safari (but not in Firefox). Simple mousemove code, such as the following (already running on the fiddle above) properly catches mousemove events, but then as long as the mouse is in the div, catches a mousemove event every second - even though I'm no longer moving the mouse. var number = 0; $("#foo").on("mousemove", function() { this.innerHTML = number++ }); This seems to be a browser-based problem, since it doesn't exhibit on FireFox. (Nor does it occur on

X11 Mouse Movement Event

大兔子大兔子 提交于 2019-11-29 21:15:26
问题 When creating a Window in XLib What are the masks I provide to the SetWindowAttributes.event_mask member? What do I have to pass to the 11th paramater of XCreateWindow() What are the Events I am looking for in the main message loop (Where I use XNextEvent(lDisplay, &xEvent); ? Since X behaves differently than Microsoft's Win32 API, how do I determine if the mouse is over my window or a window in my "Application" and not over the desktop? I have looked for a similar post. If there is already

Why does Google +1 record my mouse movements? [closed]

与世无争的帅哥 提交于 2019-11-29 18:35:48
This is only on pages with a Google +1 box on my website: It seems to be firing off an event on every mouse move. Anyone know what it is doing? I searched on Google (perhaps I should try Bing for once on this one!) but no one seems to have written about it. Is it recording information about my visitors browsing habits? Is it some sort of CAPTCHA to detect human like behviour? Example URL, press F12 in chrome, go to timeline and press record, then move your mouse around this page (it plus ones this question, don't worry): https://plusone.google.com/u/0/_/+1/button?hl=en-US&jsh=r%3Bgc%2F22224365

how to move a control on mousemove in runtime?

拥有回忆 提交于 2019-11-29 12:51:45
I have a WinForm application, I'm trying to move a pictureBox in a Form using MouseMove Event , but i can't figure out what's the right calculation should i do on MouseMove, when i first the pictureBox , its location changes in a senseless way then on moving the pictureBox Location moves correctly. It's a Panel name OuterPanel which contains the pictureBox picBox , here the code im using : private void picBox_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Point p = OuterPanel.PointToClient(MousePosition); picBox.Location = this.PointToClient(p); } } P.S : the

C++ move mouse in windows using SetCursorPos

时光怂恿深爱的人放手 提交于 2019-11-29 12:18:22
问题 I created a device similar to a wiimote and i want to use it as a mouse in windows (8.1). The device connects over tcp to a c++ win32 program on my windows computer and sends the position where the mouse cursor should move. I am using the SetCursorPos function to set the position, which works great to control most programs. But when I try to control for example the task manager, the cursor doesn't move anymore. When I switch from the task manager back to some other program it works again. I

When to use touchmove vs mousemove?

丶灬走出姿态 提交于 2019-11-29 10:56:43
问题 I build a web mobile game, it runs on browsers (PC/Mobile). Do I need to use the touchmove or not? How can I run the touchmove event like the mousemove event? 回答1: For parity between desktop and touch you have the following equivalences: mousedown === touchstart mousemove === touchmove mouseup === touchend Thus if you handle mousedown, mousemove and mouseup then you don't need to handle the corresponding equivalent events under touch. The same handlers should be executing. 回答2: Except on the

WPF how to show an Image.Source (BitmapSource) pixel position?

99封情书 提交于 2019-11-29 10:30:42
问题 Let's suppose I've got an image which shows its source in a scaled way, how could i use a MouseMove event to show in a label or textblock the pixel position in which the cursor is? (I need the pixel coordinates not the coordinates of the image relative to its size) Thanks in advance. 回答1: You can find out the actual pixel height and width from the ImageSource. ImageSource imageSource = image.Source; BitmapImage bitmapImage = (BitmapImage) imageSource ; Now since you got the image displayed in

How to draw and move shapes using mouse in C#

ⅰ亾dé卋堺 提交于 2019-11-29 10:16:35
问题 I'm new to programming in C# and wanted to ask for a little bit of help. I'm currently trying to move a color-filled rectangle that I draw on a Windows Application form with my left mouse button, and I'm trying to drag-and-drop it to another location using my right mouse button. Currently I've managed to draw the rectangle, but the right click is dragging the entire form along. Here's my code: public partial class Form1 : Form { private Point MouseDownLocation; public Form1() {

Forwarding child control MouseMove events to the parent seamlessly

☆樱花仙子☆ 提交于 2019-11-29 08:42:22
I have a custom UserControl that I am drawing using the GDI+. It is a transparent control which draws small shapes on top of the parent control. All the parent window does is creates the control, gives it a Rectangle in which to draw itself, and then it receives events if the user clicks on the non-transparent areas. The drawing part works perfectly, but right now what I need to do is to as seamlessly as possible forward all MouseMove, MouseClick, etc. events to the parent control IF those events occurred outside the shapes. The shapes are drawn using GraphicsPath, and I am already able to

Prevent mouse from leaving my form

孤街浪徒 提交于 2019-11-29 07:00:29
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 project is a game so it'd be awesome to prevent the mouse leaving my form like most other games do (ofc. you can move it out if you switch focus with alt+tab fe.) and taking a look at answers to other questions asking for global mosue movement, they seem pretty messy for my needs. Is there an easy way to prevent my mouse from going outside my form's