By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,948 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,948 IT Pros & Developers. It's quick & easy.

how to draw a SOLID line in VB.NET

P: n/a
I'm trying to draw a solid line if VB.NET the way I can in VB.

What I WANT to do is set the pentype to solidcolor, but it says pentype is read only and you have to instantiate the brush as the pen type that you want, SO ... I do this:

Expand|Select|Wrap|Line Numbers
  1.     Public myBrush As New SolidBrush(Color.Red)
  2.     Public p1 As New Pen(myBrush, 5)
And what I get when I draw a line is a pen type that is hashed. It's a bit weird, too. The line I'm drawing is between captures of the mouse position and if I move the mouse really fast, I get an almost solid line, but if I move the mouse slowly, I get a hashed line.

Any ideas what I'm doing wrong?

Thanks,

Paul
Oct 15 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.