Tuesday 12 November 2013

c# mouse position

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            string prompt = "position("+e.X.ToString()+","+e.Y.ToString()+")";
            toolStripStatusLabel1.Text = prompt;
        }
    }
}

No comments:

Post a Comment