BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Times New Roman"
Size = 63.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontTransparent = 0 'False
ForeColor = &H00FF0000&
Height = 3915
Left = 180
ScaleHeight = 259
ScaleMode = 3 'Pixel
ScaleWidth = 403
TabIndex = 0
Top = 120
Width = 6075
End
Begin VB.PictureBox pctBmp
AutoRedraw = -1 'True
AutoSize = -1 'True
Height = 1830
Left = 60
Picture = "path.frx":0000
ScaleHeight = 120
ScaleMode = 3 'Pixel
ScaleWidth = 160
TabIndex = 1
Top = 60
Visible = 0 'False
Width = 2430
End
Attribute VB_Name = "frmPaths"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
' Copyright
1997 by Desaware Inc. All Rights Reserved
Public dl&, savedDC&, WhichDrawing%
Private allCos!(90), allSin!(90)
'**********************************
'** Type Definitions:
#If Win32 Then
Private Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Type POINTAPI
x As Long
y As Long
End Type
#End If 'WIN32 Types
#If Win32 Then
Private Const SRCPAINT& = &HEE0086
Private Const SRCCOPY& = &HCC0020
Private Const SRCAND& = &H8800C6
Private Const SRCERASE& = &H440328
Private Const SRCINVERT& = &H660046
Private Const TRANSPARENT& = 1
Private Const RGN_COPY& = 5
Private Const RGN_AND& = 1
Private Const RGN_DIFF& = 4
Private Const RGN_XOR& = 3
Private Const RGN_OR& = 2
Private Const BLACK_BRUSH = 4
Private Const BLACK_PEN = 7
' Pen Styles
Private Const PS_SOLID = 0
Private Const PS_DASH = 1 ' -------
Private Const PS_DOT = 2 ' .......
Private Const PS_DASHDOT = 3 ' _._._._
Private Const PS_DASHDOTDOT = 4 ' _.._.._
Private Const PS_NULL = 5
Private Const PS_INSIDEFRAME = 6
Private Const PS_USERSTYLE = 7
Private Const PS_ALTERNATE = 8
Private Const PS_STYLE_MASK = &HF
#End If 'WIN32
'**********************************
'** Function Declarations:
#If Win32 Then
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