protected override void OnMouseClick(MouseEventArgs e) { if (!initialized) { return; } if (e.Button == MouseButtons.Middle) { zoom.ZoomReset(); this.Render(); } else if (e.Button == MouseButtons.Left) { timer.Stop(); var nfi = System.Globalization.CultureInfo.InvariantCulture.NumberFormat; PointF c = zoom.ScreenToWorld((float)e.X / this.Width, (float)e.Y / this.Height); coordinate = String.Format("X:{0} Y:{1}", c.X.ToString(nfi), c.Y.ToString(nfi)); this.Invalidate(); timer.Start(); } base.OnMouseClick(e); }