Search code examples
c#c++xamlwindows-store-appswindows-8.1

Windows 8.1 Store App: Hide mouse cursor and peridocialy move to screen-center


Is it possible to hide the mouse cursor in a Windows 8.1 Store App and move the mouse back to the screen center while moving?

something like this (SDL code):

SDL_ShowCursor(false);
...
SDL_WarpMouse(screen.width/2,screen.height/2);

Solution

  • Moving mouse pointer automatically to center is not possible in Windows app. It is avoid fooling/cheating (not the right word, but still close enough) users in app. For example, if a developer is allowed to do so then just before the click of the mouse button developer can always hide the mouse pointer from that place and move it to desired position and get ads clicked, even though user didn't wanted to do so!

    This also goes well with Windows 8/8.1 app design principles, that apps can use limited resources of the system.