Drawing a circle filled with colour

andreww
01-15-2002, 10:04 PM
In my program i need to draw circles filled with colour. I know one method eg..

for i = 1 to 20
circle(25,25),i,vbred
next i

but i was wondering if there is a proper fill command like when drawing boxes...eg
line(25,25)-(60,25),vbred,BF

also i dont want to use the "Fill style solid" from the form menu as it makes everything i draw solid, and i dont want to have to keep switching the fill style everytime i draw something

Squirm
01-16-2002, 10:14 AM
There isnt a regular VB command to do this, but there are the APIs FloodFill and ExtFloodFill which are designed for this kind of thing.

Banjo
01-17-2002, 08:10 PM
What's wrong with switching fillstyles? That's exactly what the property is for. If you are really feeling lazy then you could write something like this:
Public Sub SolidCircle(ByVal x As Long, ByVal y As Long, ByVal radius As Long, ByVal colour As Long, ByVal fillColour As Long)
Dim oldStyle As Long, oldColour As Long

oldStyle = Me.FillStyle: oldColour = Me.FillColor

Me.FillStyle = vbSolid
Me.FillColor = fillColour
Me.Circle (x, y), radius, colour

Me.FillStyle = oldStyle: Me.FillColour = oldColour
End If

Kitaiko
01-18-2002, 04:51 AM
that line and box fill thing you posted at the top reminds me of Qbasic.

well it does.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum