Created
March 3, 2018 15:58
-
-
Save anytizer/34c35641f19f3672dcab5761a8d5b2f1 to your computer and use it in GitHub Desktop.
Line draw in WinForms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paint handler | |
private void fForm_Paint(object sender, PaintEventArgs e) | |
{ | |
Pen redPen = new Pen(Color.Red, 1.0F); | |
PointF p1 = new PointF(20.0F, 50.0F); | |
PointF p2 = new PointF(200.0F, 50.0F); | |
e.Graphics.DrawLine(redPen, p1, p2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment