In this mini-article, I will show you how you can make use most of Mouse object.
How to make Mouse Visible?
If you want to see default mouse,just add these codes anywhere on your code:
this.IsMouseVisible = true;
How
to make a custom Cursor?
The
trick is to add a texture that look like a mouse cursor and set its x and y
values to the mouse's state.
Variable Declarations
Texture2D myTexture;
Vector2 spritePosition = Vector2.Zero;
LoadContent Function
myTexture = Content.Load<Texture2D>("cursor//nicecursor");
Update Function
spritePosition.X = Mouse.GetState().X;
spritePosition.Y = Mouse.GetState().Y;
Draw Function
spriteBatch.Draw(myTexture, new Rectangle((int)spritePosition.X,
(int)spritePosition.Y, 24, 24), Color.White);
The texture will move as Mouse moves.

SlocketPosted May 8, 2012, 1:56 PM
Needs update to XNA 4.0
SlocketPosted May 8, 2012, 1:23 PM
Thank you. Finally, a simple explanation including code.
Ibrahim ErsoyPosted Jan 4, 2011, 1:43 PM
Thank you Hernan for reading.Greetings to Argentina :)
Hernan ZaldivarPosted Dec 28, 2010, 9:16 AM
greetings from Argentina!