Can anyone Help?
I want to draw a line between the points which i have assigned to an array. Can this be done??
Printable View
Can anyone Help?
I want to draw a line between the points which i have assigned to an array. Can this be done??
yes
Thanks 4 u're reply Mr.ShicKadance
can u help me??
coolcat
Use the Line method.
Code:Form1.Line (100, 100)-(500, 500)
How do I insert the variables into the line method??
Sure.
Code:
'' assume we want to draw to Me.PicPlot picture
'' assume we have an Array called Arr()
'' where the X value is determined by the index
'' where the Y value is determined by the value @ the index
Dim i as Integer
Dim LastX As Integer
Dim LastY As Integer
LastX = LBound(Arr)
LastY = Arr(LBound(Arr))
For i = (LBound(Arr) + 1) To UBound(Arr)
'' make a black line
Me.PicPlot.Line (LastX, LastY) - (i, Arr(i)), vbBlack, BF
'' store the current X,Y
LastX = i
LastY = Arr(i)
Next i
Thanks Shickadance - I'll try it!!!
Quote:
Originally posted by coolcat
How do I insert the variables into the line method??
Code:Line (X1, Y1)-(X2-Y2)
you can use the PolyLine API function as well.