Hey all
Im having some trouble with some seemingly simple code
VB Code:
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Design Then Points(UBound(Points)).X = X Points(UBound(Points)).Y = Y Dim handle As Long Dim temp1 As Long Picture1.Cls handle = Picture1.hdc temp1 = Polygon(handle, Points(0), (UBound(Points) + 1)) ReDim Preserve Points(UBound(Points) + 1) As POINTAPI End If end sub
The code is fairly self explanatory but just incase: if the form is in design mode the user can click on the picture box area to form points of a polygon, after each click the polygon is redrawn.
Tracing the code shows no obvious errors, the array is fills up perfectly with coords and the polkygon api returns values of 1 which is non zero which suggests no errors. However nothing on the picture box is drawn!
Thanks in advance





Reply With Quote