[Mono-winforms-list] How Can I Hide Mouse Cursor ???
bingshiue
shinjyo.sha at msa.hinet.net
Sat May 24 23:16:09 EDT 2008
In My Project,I need run in Full Screen and Hide Mouse Cursor.
But The Cursor Don't Hide in Program Runnung
How Can I Hide Mouse Cursor ???
http://www.nabble.com/file/p17454106/cursor-in.png
http://www.nabble.com/file/p17454106/cursor-out.png
using System;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Monoform
{
public class HelloWorld : Form
{
static public void Main (string[] args)
{
//Application.Run (new HelloWorld ());
HelloWorld helloworld = new HelloWorld();
helloworld.Activate();
helloworld.Show();
Application.Run();
Application.DoEvents();
}
public HelloWorld ()
{
Text = "Hello Mono World";
this.MouseEnter += new EventHandler(Game_MouseEnter);
this.MouseLeave += new EventHandler(Game_MouseLeave);
}
public void Game_MouseEnter(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not
implemented.");
Text = "Cursoe In";
Cursor.Hide();
}
public void Game_MouseLeave(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not
implemented.");
Text = "Cursoe Out";
Cursor.Hide();
}
}
}
--
View this message in context: http://www.nabble.com/How-Can-I-Hide-Mouse-Cursor-----tp17454106p17454106.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
More information about the Mono-winforms-list
mailing list