Autohotkey crosshair overlay
![autohotkey crosshair overlay autohotkey crosshair overlay](https://i.imgur.com/DTQKZm2.png)
G.DrawLine(Pens.Black, 0, _MousePosition.Y, sz.Width, _MousePosition.Y) Ĭuriousity got the best of me. G.DrawLine(Pens.Black, _MousePosition.X, 0, _MousePosition.X, sz.Height) Protected override void OnPaint(PaintEventArgs e)īase.OnPaint(e) // allow the control to paint itself first. Invalidate both lines this.Invalidate(_CrosshairXLine) _CrosshairYLine = new Rectangle(_MousePosition.X - 3, 0, _MousePosition.X + 3, sz.Height) _CrosshairXLine = new Rectangle(0, _MousePosition.Y - 3, sz.Width, _MousePosition.Y + 3) Calculate the portion of the window in which we painted our last crosshair (with a little extra space to avoid artifacts). Protected override void OnMouseMove(MouseEventArgs e) Clear the previous lines since we just left the control this.Invalidate(_CrosshairXLine) Protected override void OnMouseLeave(EventArgs e) Protected override void OnMouseEnter(EventArgs e) Public class MyZedGraphControl : ZedGraphControl A bool return value is required by ZedGraphControl.ZedMouseEventHandler. G.DrawLine(blackPen, mouseX, formBottom,mouseX, mouseY) G.DrawLine(blackPen, formRight, mouseY, mouseX, mouseY) G.DrawLine(blackPen, mouseX, 0, mouseX,mouseY)
![autohotkey crosshair overlay autohotkey crosshair overlay](https://cdn1.epicgames.com/ue/item/RadarMinimap_screenshot1-1936x1056-54520fb11bb9cb6eed083f53d0ade05b.png)
G.DrawLine(blackPen,0,mouseY,mouseX,mouseY ) Get the coordinates that define crosshairs. Private bool ZedGraph_MouseMove(ZedGraphControl sender, MouseEventArgs e) Public static ZedGraphControl zedGraphControl1 = new ZedGraphControl() I'm using ZedGraphControl to draw the chart. The crosshairsįollows the cursor with a time lag. I have tried some solutions that have been suggested in another thread but they are a bit slow. I would like to draw a full-screen crosshairs cursor on a chart that has a lot of information.