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 c5_2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_MouseMove(object sender, MouseEventArgs e) { int x, y; x = e.X; y = e.Y; label1.Text = x.ToString(); label2.Text = y.ToString(); } private void button1_MouseMove(object sender, MouseEventArgs e) { int x, y; x = e.X; y = e.Y; label1.Text = x.ToString(); label2.Text = y.ToString(); } } }