Welcome to WindowsClient.net | Sign in | Join

Bassl Kokash

.NET Framework Developer - MCSE

Sponsors





  • advertise here

News

Intrgration - Extensionability - Solution

February 2008 - Posts

Mouse Coordinates in Form

one of the easiest way to get the mouse coordinates on the form is by using an ready attribute ,this attrbute is on the Control Class ,MousePosition and here you will get and x and y Coordinates for the mouse just in the moment of the running the application , so to get this coordinates dynamically you can bind this with MouseMove event for the form which you want to get mouse movment like this :

private void Form1_MouseMove(object sender, MouseEventArgs e)

{

label5.Text =
"X : " + Control.MousePosition.X.ToString();

label6.Text = "Y : " + Control.MousePosition.Y.ToString();

this.Refresh();

}

 

I hope thats help

Hi everybody !!

i will try with you to share and develop a a helpfull blog that i hope to be one of the most WindowsClients success blog.

since, it my first blog on the internet , i hope to help me by asking quesitons and suggesting topices to discuess.

 

Bassl Kokash

Page view counter