-
see the following code...
Private Sub Form_Paint()
Dim r As Single, initR As Single
Dim x As Single, y As Single, qbc As Integer
' Start with a clean surface.
Cls
' The center of all circles
x = ScaleWidth / 2: y = ScaleHeight / 2
' Initial radius is the lower of the two values.
If x < y Then initR = x Else initR = y
FillStyle = vbFSSolid ' Circles are filled.
' Draw circles, from the outside in.
For r = initR To 1 Step -(initR / 16)
' Use a different color for each circle.
FillColor = QBColor(qbc)
qbc = qbc + 1
Circle (x, y), r
Next
' Restore regular filling style.
FillStyle = vbFSTransparent
End Sub
i wondering what is the purpose of setting the fillstyle to vbfssolid and vbfstransparent ...
thank for any help!
-
<?>
FillStyle = vbFSSolid ' Circles are filled.
the code is documented....
as transparant you only get lines
no color fill....
If code is not commented, an easy way to help understand waht it does and doesn't do is to comment out lines and see what happens...play with things.
-
Setting the fillstyle to vbFSSolid means that when you draw a shape, the entire region covered by the shape is coloured in. The standard fill style will simply draw the outline.
i.e.
Code:
FillStyle = vbFSSolid
Circle (x, y), r ' paints a solid disc centered on x,y
FillStyle = vbFSTransparent
Circle (x, y), r ' paints a circle outline centered on x,y
Clear?
Paul.
-