mouse-cursor

Turning off process feedback cursor in windows

会有一股神秘感。 提交于 2021-01-29 16:22:00
问题 Is it possible to disable the mouse feedback cursor when a process begins from within the process? I know you can use the STARTF_FORCEOFFFEEDBACK flag when creating the process, and that the feedback cursor will turn off when the process displays a window. However, I do not have control over the code that creates my process and my process is only used for background computation, so it does not display a window. Anybody know of any system calls I can make to turn off the feedback cursor, other

Pygame: Image chasing the mouse cursor from certain length [duplicate]

浪子不回头ぞ 提交于 2021-01-28 02:07:41
问题 This question already has answers here : How to make smooth movement in pygame (2 answers) How to make enemy follow player in pygame? [duplicate] (2 answers) Enemy doesn't follow player (pygame) [duplicate] (2 answers) Closed 4 months ago . Initially the image starts moving in the direction (0,0). During each frame, the object looks at the current location of the cursor using pygame.mouse.get_pos() and updates it's direction to be direction = .9*direction + v where v is a vector of length 10

How do I know the size of a HCURSOR object

喜夏-厌秋 提交于 2020-08-20 08:04:31
问题 I want to get the height and width of a .cur file without look into its format. I try to use LoadCursorFromFile() to get a HCURSOR, I suppose there is a API function to obtain the HCURSOR infos, but I find that GetCursorInfo() is not I want at all. Is there any way to get the height and width of a HCURSOR object? 回答1: There is some overlap in the APIs between icons and cursors in Windows. You can call GetIconInfoEx with an HCURSOR as well as with an HICON. The structure you get back will have

How to hide mouse pointer in Qt app at startup?

情到浓时终转凉″ 提交于 2020-02-05 03:47:45
问题 I have a small Qt application that displays an image to the screen (more on that including source code here: Qt: Modify alpha channel transparency of a windowless QLabel). By default, Qt is inserting a mouse pointer on top of my image. For my application, I do not need any physical user interaction with Qt and thus have no need for a mouse pointer. I have used the following code to hide the mouse pointer, but it only hides the mouse once the mouse has been physically moved, and only within

Java custom cursor won't work on new computer

自闭症网瘾萝莉.ら 提交于 2020-01-24 22:03:11
问题 I recently bought a new computer and I moved my projects from my old one to my new one. I did a compilation on all of my projects and they all worked fine, and most of them still do on my new computer, but one project in particular wouldn't display the custom cursor that I had moved. I made sure that I moved the picture with the project just to rule that out. I rewrote the source to match the new location on my new computer, but it still won't display. It gives me the error message: Exception

How to get the cursor to change to the hand when hovering a <button> tag

江枫思渺然 提交于 2020-01-12 04:03:25
问题 When viewing my site, the cursor only changes to the gloved hand for <a> tags, not <button> tags. Is there a reason for this? Here is my code (the button tags have an id of #more in css3). #more { background:none; border:none; color:#FFF; font-family:Verdana, Geneva, sans-serif; } 回答1: see: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor so you need to add: cursor:pointer; In your case use: #more { background:none; border:none; color:#FFF; font-family:Verdana, Geneva, sans-serif;

How do you put the mouse cursor over the OPEN button on a JFileChooser?

假如想象 提交于 2020-01-06 04:45:50
问题 I'm trying to snap my mouse cursor over the approve button by default on a JFileChooser but I cannot find any examples anywhere where this has been done before. I have tried using hard coded x,y positions but this is useless when I run my application on a different pc. Any help would be appreciated, my code is as follows: FileOpenDialog fileChooser = new FileOpenDialog(index); fileChooser.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { } }); /

Not displaying Mouse cursor

╄→гoц情女王★ 提交于 2020-01-02 03:35:11
问题 I am developing Mac desktop application, where i am capturing the screen using CGImageRef screenShot = CGWindowListCreateImage(CGRectInfinite, kCGWindowListOptionAll, kCGNullWindowID, kCGWindowImageDefault); and display the screen shot, The problem is, i am expecting it should show the mouse cursor too, but its not showing, do i need to enable any settings for that ? I tried following before calling this function CGDisplayShowCursor(kCGDirectMainDisplay);

Optionally use Flash 10.2 cursors, while still being compatible with Flash 10.0?

随声附和 提交于 2020-01-01 14:34:39
问题 I have a Flash application that requires Flash version 10.0 to run. I want to add native mouse cursors, which were introduced in Flash 10.2, but I don't want to require all my users to upgrade, and I don't want to have to compile two separate versions of my app. Is there any way at runtime I can detect if the cursors are available, and then use them? It seems like if you only compile for Flash 10.0, it marks the SWF version header "10", and you have no access to the new APIs. And if you

Hide cursor in Chrome (and IE)

六眼飞鱼酱① 提交于 2019-12-31 12:19:08
问题 I have the following CSS that hides the mouse cursor for anything on the web page. It works perfectly in Firefox, but in IE and Chrome, it doesn't work. html { cursor: none; } In Chrome, I always see the mouse pointer. In IE, however, I see whatever cursor was last 'active' when it entered the screen. Presumably it's keeping the last selection instead of removing it. 回答1: This property cursor:none; isn't part of the standard See here w3c cursor CSS properties. You might want to look into