|
-
Nov 16th, 2000, 07:55 AM
#1
Thread Starter
New Member
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!
-
Nov 16th, 2000, 08:22 AM
#2
_______
<?>
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.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 16th, 2000, 08:26 AM
#3
Fanatic Member
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.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 16th, 2000, 08:51 AM
#4
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|