Private Declare Function SelectObject& Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long)
Private Declare Function DeleteObject& Lib "gdi32" (ByVal hObject As Long)
Private Declare Function CreatePen& Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long)
Private Declare Function GetStockObject& Lib "gdi32" (ByVal nIndex As Long)
Private Declare Function TextOut& Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long)
Private Declare Function Ellipse& Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
Private Declare Function MoveToEx& Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, Prev As POINTAPI)
Private Declare Function LineTo& Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long)
Private Declare Function GetLastError& Lib "kernel32" ()
Private Declare Function GetRgnBox& Lib "gdi32" (ByVal hdc As Long, bounds As RECT)
Private Declare Function GetClipRgn& Lib "gdi32" (ByVal hdc As Long, ByVal hRegion As Long)
Private Declare Function SaveDC& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function RestoreDC& Lib "gdi32" (ByVal hdc As Long, ByVal nSavedDC As Long)
Private Declare Function DrawText& Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long)
Private Declare Function BeginPath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function EndPath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function AbortPath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function CloseFigure& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function StrokeAndFillPath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function StrokePath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function GetPath& Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, lpTypes As Byte, ByVal nSize As Long)
Private Declare Function FlattenPath& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function SelectClipPath& Lib "gdi32" (ByVal hdc As Long, ByVal iMode As Long)
Private Declare Function PathToRegion& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function CreateRectRgn& Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
Private Declare Function SelectClipRgn& Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long)
Private Declare Function FillRgn& Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long)
Private Declare Function BitBlt& Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, _
ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, _
ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long)
#End If 'WIN32
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdWhich_Click(Index As Integer)
WhichDrawing% = Index
Out.Refresh
End Sub
Private Sub Form_Load()
Dim i%
Screen.MousePointer = 11
For i% = 1 To 90
allCos!(i%) = Cos(CSng(i%) / 180! * 3.14159)
allSin!(i%) = Sin(CSng(i%) / 180! * 3.14159)
Next i%
Screen.MousePointer = 0
End Sub
Private Sub out_Paint()
Dim usepen&, oldpen&
Dim dl&
Dim myRect As RECT, radius&, i%, j%, myPoint As POINTAPI