Example #1
0
 private void MouseTrack_Click(object sender, EventArgs e)
 {
     TrackingPanel.Width  = this.Width;
     TrackingPanel.Height = this.ClientRectangle.Height;
     TrackingPanel.Top    = this.Top;
     TrackingPanel.Left   = this.Left;
     Output.Text          = "qwe";
     MouseTimer.Tick     += (s, ev) =>
     {
         Output.Text = (new Random()).Next(1000).ToString();
         DrawSquare(MousePosition.X, MousePosition.Y, Brushes.BlueViolet, 7);
     };
     TrackingPanel.Invalidate();
     MouseTimer.Start();
     MouseTimer.Enabled = true;
 }
Example #2
0
 private void DrawThing(PaintEventHandler drawingLambda)
 {
     thingsToPaint.Add(drawingLambda);
     TrackingPanel.Paint += drawingLambda;
     TrackingPanel.Invalidate();
 }