Hiding the hardware mouse

Lot’s of people have asked, heres how to do it

using Windows.UI.Core;

  Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
  Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerReleased;

put that in your start up code and then this:-
        private void CoreWindow_PointerPressed(CoreWindow sender,PointerEventArgs args)
        {
          SetHardCursorPosition();
        }
        private void CoreWindow_PointerReleased(CoreWindow sender,PointerEventArgs args)
        {
          SetHardCursorPosition();
        }
Followed by this:-
private void SetHardCursorPosition()
{
  if(Window.Current.CoreWindow != null)
  {
    Window.Current.CoreWindow.PointerPosition = new Windows.Foundation.Point
      (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width,GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / 2);
  }
}

you’ll never see that god damn pointer again!

Question for the people on here though? why is it I seem to be the only person writing how too’s?
Nobody knew how to hide the cursor? nobody knew how to make ads work using Android or UWP, no-one knew how to do scroll bars on a PC? I thought this was a place for people to know shit? I just solved how to do independent screen resolution, works on every device, IOS, ANDROID, WIN UWP, all of them full screen, I asked here months ago and go zero help. Why do the “think I know” people write so much that never works, that haven’t released games or apps do all the talking? Open Platforms such as this are a good thing, Linux was a good thing until I looked at the source code (16000+ GOTO commands!!! DICKHEADS), If your gonna do open source, get it right? gamers want to do full screen, they want to show ads, they want to put them on the store (multimedia lib don’t work) do it right?

So basically you’re screaming at a bunch of hobbyists which give their free time to produce a free software and try to answer questions to community. No matter how “bad” that software is (which is not) that’s very unfair. Anyways…

The answer for all your questions/comments is easy: the monogame community is VERY small. Probably much smaller than 1/1000th of the Unity3D community. For each question in Unity3D maybe you get 6-7 answers,and some of them go unanswered. Divide that by 1/1000th. And remove the Unity3D paid staff answering some of the questions. People here also have lives, and games to do.

Also, the project is probably far too big for the small amount of active collaborators.

Thanks for the tutorials, btw.

p.s. Your code to hide the hardware mouse will probably only work if you don’t use the mouse at all in your app. Otherwise changing the mouse position will probably break all interaction produced by the mouse.

p.s.2 Lots of the problems people have with MonoGame are not related to MonoGame. In example, if you want to show adverts in Android, go Xamarin forums and ask there. Showing ads on android is “99% xamarin 1% monogame”. Showing ads on UWP is “99% UWP 1% monogame” (and 100% a disaster control)
If you want to remove the cursor in UWP, go to UWP forums and ask that there. Hiding the cursor is “100% UWP” (btw, googling “uwp hide cursor” sent me to https://social.msdn.microsoft.com/Forums/sqlserver/en-US/44d9d6d4-efb4-48cb-aaab-7e174dcd3ed0/uwphow-do-i-hide-the-mouse-cursor?forum=wpdevelop which seems a solution… but the point is: asking for UWP cursor hiding is not a task of MonoGame developers/maintainers/helpers. ) I don’t know what you mean by “pc scroll bars”, but I bet it’s also out of scope of MonoGame. Full Screen IS a MG task.

2 Likes

I have replied to your other thread, so, try asking politely and with as much detail as you can but honestly this answer is everywhere, just search for it… Hide Mouse Cursor… EDIT or better, XNA SHOW MOUSE

HERE:

protected override void Initialize()
{
    this.IsMouseVisible = true;
    base.Initialize();
}

Just remember, this is from XNA, so a lot of your answers can be found through XNA…

I am planning to write guides from an XNA development perspective so that it covers both routes into MonoGame, just life is in the way at the moment…