Ok, just a quicky Q... can anyone show me an example of how you can plot a line in a picture box? Or better yet, how bout a quadratic?
Printable View
Ok, just a quicky Q... can anyone show me an example of how you can plot a line in a picture box? Or better yet, how bout a quadratic?
Code:Option Explicit
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function Polyline Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
Dim xPt(0 To 3) As POINTAPI
Private Sub Command1_Click()
Picture1.Line (500, 500)-(1000, 1000), vbRed
End Sub
'OR this as well...
Private Sub Picture1_Paint()
xPt(0).X = 10: xPt(0).Y = 10
xPt(1).X = 10: xPt(1).Y = 100
xPt(2).X = 10: xPt(2).Y = 50
xPt(3).X = 50: xPt(3).Y = 10
Polyline Picture1.hdc, xPt(0), 6
End Sub
Thanks!