mouse

ActionScript 2: Is it possible to test is the mouse is pressed without setting up an event ?

Is it possible to read the mouse key, like you do with Key.isDown(), ie. without setting up an unPress event/callback? ...

Force a mouse event in Silverlight 3

I have 2 UserControls: uc1 and uc2 On uc1.MouseOver, uc2 increases in size. On uc1.MouseLeave, uc2 returns to the original size. On uc1.MouseLeftButtonUp, a popup is opened. However, when the popup is then closed, uc1.MouseLeave is not triggered, so uc2 doesn't return to it's original size. A solution would be to have uc2 also subscr...

Non-HID Mouse driver on NT

I'm looking to write a custom touchpad driver for my laptop, as its support under Windows is abysmal. I have the protocol figured out and I'm ready to go ahead and implement it, but I'm a bit confused as to how to go about it. It's a multitouch touchpad, so I'd like to support the Windows Touch interfaces in addition to standard mouse ...

How to get the mouse button state in Silverlight outside of button press events?

I have the following situation I handle when the left mouse button is pressed in my Silverlight app and do some things while the mouse is held down and the mouse moves. When the left button is released, I turn off the flag that's telling it to do the stuff and the mouse movement handler then no longer does the stuff. The problem is: if...

Mouse Gesture Libraries for .Net?

Are there any half decent mouse gesture libraries for .Net? Have found very few and no decent ones. ...

Using mouseover to display a picture

I am trying to add a script to my site where I can mouseover a clickable text link and before clicking a description with a picture would appear in a specified box location. Please see something very similar on Subway's site: http://www.subway.com/applications/Menu/frmMenuPanel.aspx?CC=USA&LC=ENG&MenuID=36 ...

Global Mouse Moved Events in Cocoa

Is there a way to register for global mouse moved events in Cocoa? I was able to register for the events using Carbon's InstallEventHandler(), but would prefer a Cocoa equivalent. I have looked for NSNotificationCenter events, but there doesn't seem to be any public event names (are there private ones?) Alternatively, is there a way to ...

jquery focus, but with more accurate postion.

you can easily find focus() answers from the site or any site.. but what i want to know, how can i use focus after what i just inserted inside the input box. $("input").val('@user').focus(); // this goes to start of the input box and foucs from start, but i want it to focus after the @user $("input").val('@user today i did new things')...

Java mouse operations

I am writing a game in Java, and need to have mouse interaction. I was going to use MouseAdapter, but I've looked into it some, and it does not seem to have any means of determining the location of the mouse pointer without a click or action being done... What would be the recommended way of doing this? A couple questions: Would the m...

Mouse movement optimizations

I want to have a game where the view will move around as the mouse reaches the outer edge of the window (similar to many RTS games). I have read that there is significant overhead when using the MouseMotionListener. Is there perhaps a way of having a second transparent component within the game window (JPanel) that does not affect game-...

Mouse hook in a specific window

I need to set a hook on mouse clicks, using C++, Win API. So that when an icon on the desktop is being clicked I get the event. How will this happen? I think the only information I get in mouse hook event are the coordinates for the mouse, right? Now how do I make sure that the thing clicked is an icon on the desktop? ...

Get window handle on which mouse button was clicked

Hey, I'm using Windows Hook, I installed the mouse hook, system-wide and its working perfectly. Now there is a problem, I need to the get window handle on which the mouse was clicked.. How do I do that? Does the Mouse hook event passes us that information? ...

Create a fully transparent WPF window to capture mouse events

I'm trying to trap mouse events in WPF by using a topmost, transparent non-modal window. I'm finding that this works fine if the opacity of the window is 0.01 or greater and it has a background color, but when the opacity is set to 0 it no longer receives mouse messages. Is there a way make this window look fully transparent and still ...

Distinguishing a single click from a double click in Cocoa on the Mac

I have a custom NSView (it's one of many and they all live inside an NSCollectionView. I don't think that's relevant, but who knows?). When I single-click the view, I want it to change its selection state (and redraw itself accordingly); when I double-click the view, I want it to pop up a larger preview window for the object that was jus...

Mouse over Color in Java

I need to make a game in Java for a project. What I'm trying to do is a game where you have to go through a maze without touching the walls. Is there a way to get the color of the pixel the mouse is over? ...

How to use mouse controls in Silverlight

I need to choose area in my Silverlight application and after area is chosen, it will have rectangle after mouse click is realeased. ...

How to get cardinal mouse direction from mouse coordinates

Hello, is it possible to get the mouse direction (Left, Right, Up, Down) based on mouse last position and current position? I have written the code to calculate the angle between two vectors but I am not sure if it is right. Can someone please point me to the right direction? public enum Direction { Left = 0, Ri...

How to raise mouse and keyboards events in JS

Is there a way to send mouse events and keyboard events in JavaScript? Does all browsers support this need? -Datte ...

How do I limit the following cursor to a specific area

I have a flash cs3 file where I want a mask to move on the y axis (up and down) when the user is scrolling over the navigation area. In my code, I have: maskMC.startdrag(); How do I limit the area where the mask will move, then make it return it back to it's original position when the user moves away from the specific area (in this ca...

can I "cancel" mouse move and make the mouse cursor remain visible but in place?

I am implementing shape resizing using corner handles. In some cases, certain moves with the mouse holding the handle are not legit, e.g. if it will in effect extend it beyond the control boundary. So what I would like to do in this case is "cancel" the mouse move in flight programmatically, so that the mouse would just stay within the b...