In visual basic CCE if I wanted to draw a line using code the esiest way was
how do I do this in vb.net?Code:Me.Line (1, 1)-(100, 100)
Printable View
In visual basic CCE if I wanted to draw a line using code the esiest way was
how do I do this in vb.net?Code:Me.Line (1, 1)-(100, 100)
Your going to have to get a reference to the forms graphics object, and use that to draw lines and shapes.
Something like this.....probably not exact though...
Dim g as Graphics = form1.GetGraphics
Dim g As Graphics = Me.CreateGraphics
g.DrawLine(Pens.Black, 0, 20, 100, 20)
g.Dispose()
If you use that method for fast graphics(Ex: Visuals for a music player) you will get lots of flicker. Trust me. I have been through it already. The fastest(To me) and still easy(To me) is to create a bitmap in memory and draw the graphics in memory then apply it to the object. It is very fast and has 0 flicker.
Jason