using System;
using System.Drawing;
using System.Windows.Forms;
namespace AsyncWorkerCs {
public partial class uclPureGui : UserControl {
//the basic, blocking process
public uclPureGui() { InitializeComponent(); }
private void ucl_MouseDown(object sender, MouseEventArgs e) {
//evaluate data
System.Threading.Thread.Sleep(1000);
var p = e.Location;
var s = string.Format("Position {0} / {1}\nclicked at {2:T}", p.X, p.Y, DateTime.Now);
//display result
label1.Text = s;
label1.Location = p - label1.Size;
}
}
}