Private Sub DrawSample(ByRef X As Single, ByRef Y As _
Single, ByVal fill_style As FillStyleConstants, ByVal _
txt As String)
Const WID As Single = 1440 * 2
Const HGT As Single = 1440 / 2
Const GAP As Single = 120 * 3
Me.FillStyle = fill_style
Me.Line (X, Y)-Step(Me.ScaleWidth - 2 * X, HGT), , B
Y = Y + HGT
Me.CurrentX = X
Me.CurrentY = Y
Me.Print txt
Y = Y + GAP
End Sub
|
Private Sub Form_Paint()
Dim X As Single
Dim Y As Single
Me.FillColor = vbWhite
Me.ForeColor = vbBlue
X = 120
Y = 120
DrawSample X, Y, vbCross, "vbCross"
DrawSample X, Y, vbDiagonalCross, "vbDiagonalCross"
DrawSample X, Y, vbDownwardDiagonal, _
"vbDownwardDiagonal"
DrawSample X, Y, vbFSSolid, "vbFSSolid"
DrawSample X, Y, vbFSTransparent, "vbFSTransparent"
DrawSample X, Y, vbHorizontalLine, "vbHorizontalLine"
DrawSample X, Y, vbUpwardDiagonal, "vbUpwardDiagonal"
DrawSample X, Y, vbVerticalLine, "vbVerticalLine"
End Sub
|