6

I'm dealing with software that frequently (almost exlusively) runs on computers boasting resolutions of over 5000x3000 pixels.

On such large displays, we needed a way to show the user where their mouse is. We looked in to making the actual cursor larger, but this seems to be impossible on Windows; instead, we've decided that on a certain keypress we would create a transparent form the size of the desktop, and on that we would draw a MouseCursor.png file that would refresh itself every 40-100ms.

However, on such a large canvas it does not work as responsively as we would like. Does anyone have any suggestions on how best to tackle such an issue?

DTI-Matt
  • 2,065
  • 9
  • 35
  • 60
  • 5
    windows has an option to show a contracting circle around the mouse location on ctrl click – Jonesopolis Aug 21 '13 at 12:50
  • 2
    If you onyl plan to do this on a keypress why don't you just enable "Show location of pointer when I press CTRL key" in the Mouse Properties? – Christoph Fink Aug 21 '13 at 12:51
  • 3
    Why do you think you can't increase the size of the mouse cursor? Windows itself already comes with differently sized mouse cursors. As far as I can see, you simply would need to provide a `.cur` file that contains a bigger cursor. – Daniel Hilgarth Aug 21 '13 at 12:52
  • Do you need to keep interactions with whatever is underneath the cursor? If so I would look into using a Direct X overlay to draw to the screen. It's very good at drawing simple things quickly but you'd have to write a lot more of the code. – bendataclear Aug 21 '13 at 12:52
  • 4
    If you want to go the Winforms route, why not draw a small form the size of the desired mouse cursor and move it along with the mouse? – mbeckish Aug 21 '13 at 13:00
  • 1. The red, contracting circle is often not noticeable enough when working on a a computer of this size. These are typically used in control room situations and as such the operators are seated far away. They need a larger mouse for pointing purposes, not necessarily for interacting with the PC. 2. If you specify a mouse cursor with a size larger than 48x48 (or was it 64x64) Windows will resize it to that maximum. I want one around 250x250. – DTI-Matt Aug 21 '13 at 13:01
  • Does [this post](http://stackoverflow.com/a/2100667/21727) help? – mbeckish Aug 21 '13 at 13:04
  • Unfortunately I've [barked](http://stackoverflow.com/questions/13729092/how-to-draw-attention-to-the-current-mouse-location) up [this](http://stackoverflow.com/questions/13688159/how-to-override-maximum-32x32-mouse-size-in-windows-like-this-program-can) tree [before](http://stackoverflow.com/questions/11507945/increase-cursor-size-on-entire-desktop) – DTI-Matt Aug 21 '13 at 13:11
  • 1
    @DTI-Matt **The solution for you:** Use a large screen/monitor instead, for example, a 14" with screen resolution of 1366x768, with your screen resolution, we should use a screen with size of 42". That will be OK without any hack. – King King Aug 21 '13 at 13:27
  • @DTI-Matt - In one of your previous posts, you discard the SetSystemCursor function because "How can I, system-wide, increase the size of the mouse cursor? I'd have to increase all mouse cursors too, so I don't think SetCursor would do the trick, at least not in any nice, clean way." Is that solution still not suitable for you? Or maybe, given the lack of other options, is it worth revisiting? – mbeckish Aug 21 '13 at 14:36
  • In fact SetSystemCursor sizes are still limited to a maximum size by Windows. I've instead taken your previous suggestion of drawing the mouse once, with a much smaller form, and moving the form to the mouse's location every 40ms (approx 25fps). This is suitable for the time being, and is the best result I've gotten in the long time I've looked for an answer to this question. – DTI-Matt Aug 21 '13 at 14:39
  • Is it too slow to just do the form movement in the OnMouseMove event handler? – mbeckish Aug 21 '13 at 14:56
  • Hah, this is another particularity of my situation: The mouse clicks need to go to whatever is beneath the form, and not to the form itself (aka, just clicking on the BigMouse.png) to achieve this I used this SO answer: http://stackoverflow.com/a/173800/1233949 Therefore, the mouse move event doesnt fire on this form, and a refresh timer is required to update the position. I'm sure I could lower the refresh time without harm, but it doesn't appear sluggish in the least at 40ms. – DTI-Matt Aug 21 '13 at 15:02

1 Answers1

1

The mouse cursor is displayed with a hardware feature, a video overlay. Very difficult to compete with that feature in software.

Control Panel + Mouse, Pointers tab. If the "extra large" variety isn't good enough and the "Display pointer trails" option on the Options tab isn't helpful either then you still have a Browse button to load your own .cur files.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536