public void StartTimer() { Every4Minutes.Interval = 1000; Every4Minutes.Tick += new EventHandler(MoveNow); pointPos = pointPos * -1; Cursor.Position = new System.Drawing.Point(Cursor.Position.X + pointPos, Cursor.Position.Y + pointPos); lblRunStatus.Text = "Running"; Every4Minutes.Start(); }
private void Every4Minutes_Tick(object sender, EventArgs e) { if (!KeepGoing) { Every4Minutes.Stop(); lblRunStatus.Text = "Not Running"; lblRunStatus.Visible = true; return; } lblRunStatus.Visible = !lblRunStatus.Visible; }