mouse-cursor

Bad cursor in select/option, IE

本秂侑毒 提交于 2019-12-01 22:14:20
I have a problem with bad cursor in options when the text is under that. Normally, the option uses "default" cursor, but when eg. the paragraph is under option, in IE I see "text" cursor. Code: <form> <select> <option value=a selected="selected">First <option value=b>Second <option value=c>Third <option value=c>Fourth </select> <p>text</p> </form> It´s in IE11 and I think the older ones makes the same. I tried to set position: relative and z-index to select, option and paragraph, set cursor with important to select, option, but no solution, situation is the same. Any idea? IE does not honour

How do I create a dynamic mouse cursor .NET without using interop?

浪子不回头ぞ 提交于 2019-12-01 20:47:01
I have an application which I'm interested in eventually porting to mono so I'm trying to avoid using p/invoke's to accomplish this task. I would like to load a cursor dynamically, as in I have a Bitmap that is generated on the fly in the application. From what I can tell the safest way to do it without using p/invoke's is to create a .cur file which I can then load to a memory stream and use the Cursor(Stream) constructor. However I have no idea how to create a .cur file. I found this article on the Microsoft Knowledge Base which sort of explains the format, but I'm not sure how it can be

How to change the mouse cursor in Objective-C

╄→尐↘猪︶ㄣ 提交于 2019-12-01 14:41:54
I am making an image editing application, but it looks very incomplete without a cursor like they have in Photoshop for the paintbrush. How can I set the icon, and have it change back when I exit the application? This is the code in my header file (just in case it's needed): @interface test : NSWindow <NSWindowDelegate> { IBOutlet id myView; } @end myView is an NSView (customView) that will display everything. There's a handy NSCursor class for handling cursor appearance. If one of the built-in cursors doesn't look how you need it to, you can initialize a new NSCursor with an NSImage and -set

WinAPI get mouse cursor icon

倾然丶 夕夏残阳落幕 提交于 2019-12-01 06:45:48
I want to get the cursor icon in Windows. I think language I use isn't very important here, so I will just write pseudo code with WinAPI functions I'm trying to use: c = CURSORINFO.new(20, 1, 1, POINT.new(1,1)); GetCursorInfo(c); #provides correctly filled structure with hCursor DrawIcon(GetWindowDC(GetForegroundWindow()), 1, 1, c.hCursor); So this part works fine, it draws current cursor on active window. But that's not what I want. I want to get an array of pixels, so I should draw it in memory. I'm trying to do it like this: hdc = CreateCompatibleDC(GetDC(0)); #returns non-zero int canvas =

WinAPI get mouse cursor icon

↘锁芯ラ 提交于 2019-12-01 04:59:09
问题 I want to get the cursor icon in Windows. I think language I use isn't very important here, so I will just write pseudo code with WinAPI functions I'm trying to use: c = CURSORINFO.new(20, 1, 1, POINT.new(1,1)); GetCursorInfo(c); #provides correctly filled structure with hCursor DrawIcon(GetWindowDC(GetForegroundWindow()), 1, 1, c.hCursor); So this part works fine, it draws current cursor on active window. But that's not what I want. I want to get an array of pixels, so I should draw it in

In Swing, is there a way to extract a predefined mouse cursor Image from the toolkit?

房东的猫 提交于 2019-11-29 15:27:55
I'd like to make a custom help cursor by "badging" the built-in default mouse cursor with a question mark when the user is hovering over an object that can be clicked for context-sensitive help. I'd like this to work nicely across platforms/look-and-feels (to look consistent with the white Windows mouse and the black Mac mouse, for instance.) Is there a way to get the cursor Image from the current Toolkit so that I could generate a combined Image to set as the cursor? This question points out that the information can't be gotten from the Cursor object. There's also a comment there that

Mouse cursor not changing if a pointer is not moved in Webkit-based browsers

五迷三道 提交于 2019-11-29 13:24:40
Let's assume that we have simple jQuery code like the following: var $document = $(document); $document.ready(function() { var $test = $("#test"); $document.keydown(function(e) { e.shiftKey && $test.css("cursor", "pointer"); }); }); The problem is that WebKit does not change the #test block mouse cursor if the mouse pointer is moved over the #test block, and the Shift key is pressed then. But as soon as you move the cursor, Chrome and Safari change the cursor style to pointer - exactly as it's expected but without mouse move. This bug (?) is not relevant to Firefox, and I didn't check it under

WPF Wait Cursor With BackgroundWorker Thread

南笙酒味 提交于 2019-11-29 11:56:04
I want to show the hourglass cursor and disable the window while a BackgroundWorker process runs in another thread. This is what I'm doing: Private Sub MyButton_Click(...) Dim box As New AnotherWpfWindow() box.Owner = Me ... box.ShowDialog() If (box.DialogResult.GetValueOrDefault = True) Then Me.IsEnabled = False Me.Cursor = Cursors.Wait MyBackgroundWorker.RunWorkerAsync() End If End Sub Private Sub MyBackgroundWorker_RunWorkerCompleted(...) UpdateInterface() Me.IsEnabled = True Me.Cursor = Cursors.Arrow End Sub The window becomes disabled like I want, but the cursor remains an arrow. How can

How to change the mouse cursor in java?

痴心易碎 提交于 2019-11-29 01:41:23
问题 I have a list of words inside the JList. Every time I point the mouse cursor at a word, I want the cursor to change into a hand cursor. Now my problem is how to do that? Could someone help me with this problem? 回答1: Use a MouseMotionListener on your JList to detect when the mouse enters it and then call setCursor to convert it into a HAND_CURSOR . Sample code: final JList list = new JList(new String[] {"a","b","c"}); list.addMouseMotionListener(new MouseMotionListener() { @Override public

In Swing, is there a way to extract a predefined mouse cursor Image from the toolkit?

假如想象 提交于 2019-11-28 08:45:38
问题 I'd like to make a custom help cursor by "badging" the built-in default mouse cursor with a question mark when the user is hovering over an object that can be clicked for context-sensitive help. I'd like this to work nicely across platforms/look-and-feels (to look consistent with the white Windows mouse and the black Mac mouse, for instance.) Is there a way to get the cursor Image from the current Toolkit so that I could generate a combined Image to set as the cursor? This question points out