Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the thickness of a line in VB.NET

In VB.NET I'm drawing an ellipse using some code like this.

 aPen = New Pen(Color.Black)
 g.DrawEllipse(aPen, n.boxLeft, n.boxTop, n.getWidth(), n.getHeight)

But I want to set the thickness of the line. How do I do it? Is it a property of the Pen or an argument to the DrawEllipse method?

(NB : For some reason, the help is VisualStudio is failing me so I've got to hit the web anyway. Thought I'd try here first.)

like image 801
interstar Avatar asked Sep 21 '08 17:09

interstar


People also ask

How do I draw a line in VB net?

To do that right-click on toolbox select "Choose Items...". Locate "Line Shape" on the . Net Framework Components tab.


1 Answers

Use the pen's Width property.

aPen.Width = 10.0F
like image 81
chakrit Avatar answered Oct 03 '22 09:10

chakrit