how to draw a SOLID line in VB.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Hinds

    how to draw a SOLID line in VB.NET

    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:

    Code:
        Public myBrush As New SolidBrush(Color.Red)
        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
    Last edited by Atli; Oct 15 '10, 01:11 AM. Reason: Please use [code] tags when posting code.
Working...