Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
Private Type POINTAPI
    x As Long
    y As Long
End Type
Private Declare Function PolylineTo Lib "gdi32" (ByVal hdc As Long, lppt As POINTAPI, ByVal cCount As Long) As Long
Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpPoint As Any) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Me.ScaleMode = vbPixels
End Sub
Private Sub Form_Paint()
    Dim Pt(1 To 1000) As POINTAPI, Angle As Single, Radius As Single
    Dim Number As Integer, XMid As Long, YMid As Long
    XMid = Me.ScaleWidth / 2
    YMid = Me.ScaleHeight / 2
    'Fill our array with points
    For Number = 1 To 1000
        Angle = Number * 0.1
        Radius = Radius + Angle * 0.01
        Pt(Number).x = XMid + Cos(Angle) * Radius
        Pt(Number).y = YMid - Sin(Angle) * Radius
    Next Number
    'Set the co÷rdinates of the active point
    MoveToEx Me.hdc, Me.ScaleWidth / 2, Me.ScaleHeight / 2, ByVal 0&
    'Draw several lines
    PolylineTo Me.hdc, Pt(1), 1000
End Sub
Private Sub Form_Resize()
    Me.Cls
    Form_Paint
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/