Monday, February 06, 2006

CreateGraphics

' for some reason to create graphics in vb.net 2005 express I have to declare
' graphics as follows, which is slightly different from vb.net 2003

Dim g As Graphics = PictureBox1.CreateGraphics
Dim PPen As New Pen(Color.Red)

'// Lines
g.DrawLine(PPen, 1, 1, 50, 50)
' etc

No comments:

Post a Comment