YellowFlash
YellowFlash

Reputation: 139

How to create coordinates on the form?

I want to create a form, which has two lines on it just like the two coordinates x-axis and y-axis. And then I want to add points on these coordinates. e.g.

How can I do this? Here are the two lines, which I have drawn:

e.Graphics.DrawLine(Pens.Black, 190, 210, 350, 210)
e.Graphics.DrawLine(Pens.Black, 330, 90, 330, 300)

Upvotes: 1

Views: 51

Answers (1)

Spencer Waz
Spencer Waz

Reputation: 155

Since you already have your lines, use this for your points:

e.Graphics.FillEllipsis(Brushes.Black, new Rectangle(x,y,width,height));

x,y is the coordinate where you want the circle to be. Width height is obviously the size of your circle

Upvotes: 1

Related Questions