mouse-pointer

Hide Mouse Pointer on Android

点点圈 提交于 2019-12-23 07:28:20
问题 I'm writing a game for OUYA and Android and I'm using the trackpad on the OUYA controller. When ever you touch it a mouse pointer comes up and I can't find a way to hide it. I image this would be a problem for games on an Android netbook as well. Has anyone found a way to interact with the cursor instead of just listening for events? 回答1: This won't hide the mouse, but it will at least help prevent touch events from interfering with your joystick processing code -- not a proper solution I

Silverlight: Is it possible to use custom mouse cursors/pointers?

僤鯓⒐⒋嵵緔 提交于 2019-12-10 19:13:46
问题 I have just found this page indicating the support for Silverlight mouse cursors: http://msdn.microsoft.com/en-us/library/system.windows.input.cursor(VS.95).aspx Is that it!!! :-| what are they thinking, at least there is stylish looking Eraser! Is there aany other way to use custom cursors? How efficient/usable would it be to hide the cursor and show a png instead? 回答1: I found an example here: http://nokola.com/blog/post/2009/12/13/Adorners-in-Silverlight-Move-Size-Rotate-Custom-Mouse

Change mouse pointer in UWP app

感情迁移 提交于 2019-12-06 21:45:15
问题 Is it possible to change or even hide the mouse-pointer in a UWP app? The only thing I can find is this : Windows.UI.Xaml.Window.Current.CoreWindow.PointerCursor = null; But in UWP, this doesn't work. 回答1: Yes this can be done by settings the Window.Current.CoreWindow.PointerCursor . If you set it to null, the pointer is hidden. Otherwise you can use the CoreCursorType enumeration to set a specific system point. For instance use this to set the Arrow type: Window.Current.CoreWindow

Toggle Enhance pointer precision

☆樱花仙子☆ 提交于 2019-12-06 08:33:32
问题 We are basically creating a control panel applet. We need to toggle "Enhance pointer precision" in Mouse Properties. To do so we need to call SystemParametersInfo with SPI_GETMOUSE . It has an array of 3 elements as its third parameter. I'm new to PInvoke and I've tried many signatures but so far no luck. Here is what I've tried for the signature: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] static extern bool SystemParametersInfo(uint uiAction, uint

Change mouse pointer in UWP app

社会主义新天地 提交于 2019-12-05 01:50:26
Is it possible to change or even hide the mouse-pointer in a UWP app? The only thing I can find is this : Windows.UI.Xaml.Window.Current.CoreWindow.PointerCursor = null; But in UWP, this doesn't work. Yes this can be done by settings the Window.Current.CoreWindow.PointerCursor . If you set it to null, the pointer is hidden. Otherwise you can use the CoreCursorType enumeration to set a specific system point. For instance use this to set the Arrow type: Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 0); You can also add custom

Toggle Enhance pointer precision

安稳与你 提交于 2019-12-04 11:44:15
We are basically creating a control panel applet. We need to toggle "Enhance pointer precision" in Mouse Properties. To do so we need to call SystemParametersInfo with SPI_GETMOUSE . It has an array of 3 elements as its third parameter. I'm new to PInvoke and I've tried many signatures but so far no luck. Here is what I've tried for the signature: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] static extern bool SystemParametersInfo(uint uiAction, uint uiParam, [MarshalAs(UnmanagedType.LPArray)] ref long[] vparam, SPIF fWinIni); static extern bool

Programmatically change cursor speed in windows

僤鯓⒐⒋嵵緔 提交于 2019-12-02 15:01:03
问题 Since getting a satisfactory answer on SuperUser is very difficult, I want to rephrase this question and ask: Is there any way to programmatically detect a mouse was plugged in the usb port, and change the cursor speed in windows (perhaps through an API)? I'd like to use C#, but I'm open to any language that can run on a windows 7 machine. 回答1: I don't know about the detection but you can use P/Invoke to the SystemParametersInfo api using [DllImport("user32.dll", SetLastError = true)] [return

Mouse Position Python Tkinter

不打扰是莪最后的温柔 提交于 2019-11-26 22:51:16
Is there a way to get the position of the mouse and set it as a var? You could set up a callback to react to <Motion> events: import Tkinter as tk root = tk.Tk() def motion(event): x, y = event.x, event.y print('{}, {}'.format(x, y)) root.bind('<Motion>', motion) root.mainloop() I'm not sure what kind of variable you want. Above, I set local variables x and y to the mouse coordinates. If you make motion a class method, then you could set instance attributes self.x and self.y to the mouse coordinates, which could then be accessible from other class methods. Bryan Oakley At any point in time you

Getting the browser cursor from “wait” to “auto” without the user moving the mouse

↘锁芯ラ 提交于 2019-11-26 19:44:47
I use this jQuery code to set the mouse pointer to its busy state (hourglass) during an Ajax call... $('body').css('cursor', 'wait'); and this corresponding code to set it back to normal... $('body').css('cursor', 'auto'); This works fine... on some browsers. On Firefox and IE, as soon as I execute the command, the mouse cursor changes. This is the behavior I want. On Chrome and Safari, the mouse cursor does not visibly change from "busy" to "auto" until the user moves the pointer. What is the best way to get the reluctant browsers to switch the mouse pointer? user213788 It is a bug in both

Mouse Position Python Tkinter

一曲冷凌霜 提交于 2019-11-26 07:46:45
问题 Is there a way to get the position of the mouse and set it as a var? 回答1: You could set up a callback to react to <Motion> events: import Tkinter as tk root = tk.Tk() def motion(event): x, y = event.x, event.y print('{}, {}'.format(x, y)) root.bind('<Motion>', motion) root.mainloop() I'm not sure what kind of variable you want. Above, I set local variables x and y to the mouse coordinates. If you make motion a class method, then you could set instance attributes self.x and self.y to the mouse