-
Hey fellers,
I want to draw a line in a picture box. How do I do it!?!?! I could use the SetPixelV API call but surely there's an easier way to do it. Is there an in-built function that can just draw a line from (4,40) to (20,80) for instance?
Cheers in advance,
Sam
-
add 1 picture and a line to your form
then CUT the line and PASTE it into the picture box
therefore, the line will be in the picture box
-
Or use the PictureBox's line (function/control/sub/property?)
Code:
'Customize to fit your needs
Picture1.Line (2000, 300)-(100, 300), RGB(0, 0, 255)
-
Thanx!
Dimava, that works but I need to draw lines at runtime. Therefore Matthew's reply is exactly what I'm looking for. I knew the Line event of a picture box existed but I didn't know how to use it. Cheers for the help guys!
Sam