// Draw the Line that is cross private void DrawReversibleLine(Point p) { ControlPaint.DrawReversibleLine( PB_FS.PointToScreen(new Point(0, p.Y)), PB_FS.PointToScreen(new Point(PB_FS.Width, p.Y)), Color.Red); ControlPaint.DrawReversibleLine( PB_FS.PointToScreen(new Point(p.X, 0)), PB_FS.PointToScreen(new Point(p.X, PB_FS.Height)), Color.Red); }
//When it collect 4 click, display the 4 point location private void PB_FS_Click(object sender, EventArgs e) { MouseEventArgs me = (MouseEventArgs)e; ClickTime++; pos[ClickTime] = me.Location; PB_FS.Invalidate(); if (ClickTime == 3) { ActivateResForm(); //this.Close(); } }