 |

01-13-2003, 07:02 AM
|
|
Regular
|
|
Join Date: Oct 2002
Location: New Jersey, USA
Posts: 59
|
|
Filling in Circles
|
In order to make a filled box, you do this:
form1.line (x1,y1) - (x2,y2), , BF
How do I go about making a filled circle?
|
|

01-13-2003, 07:04 AM
|
 |
Back for a little while..
Retired Leader * Expert *
|
|
Join Date: Oct 2002
Location: Behind you.....Boo
Posts: 2,199
|
|
Read the vb help
The first line in the remarks begins....
Quote:
Remarks
To fill a circle, set the FillColor and FillStyle properties of the object on which the circle or ellipse is drawn. Only a closed figure can be filled. Closed figures include circles, ellipses, or pie slices (arcs with radius lines drawn at both ends).
|
Hope that helps..
|
__________________
....but then, what would I know ?
|

01-13-2003, 07:06 AM
|
|
Regular
|
|
Join Date: Oct 2002
Location: New Jersey, USA
Posts: 59
|
|
|
but what's the syntex to filling them?
|
|

01-13-2003, 07:08 AM
|
 |
Back for a little while..
Retired Leader * Expert *
|
|
Join Date: Oct 2002
Location: Behind you.....Boo
Posts: 2,199
|
|
huh ???
Quote:
|
set the FillColor and FillStyle properties of the object on which the circle
|
So that would be your form1
ie, form1.fillcolor
|
__________________
....but then, what would I know ?
|

01-13-2003, 07:09 AM
|
|
Regular
|
|
Join Date: Oct 2002
Location: New Jersey, USA
Posts: 59
|
|
|
Ok, I get it. It's not like with boxes that there's a peramtier that you can set. Thanks.
|
|

01-13-2003, 07:11 AM
|
 |
Back for a little while..
Retired Leader * Expert *
|
|
Join Date: Oct 2002
Location: Behind you.....Boo
Posts: 2,199
|
|
No, it's not like boxes. It's the way it says in the help
Quote:
Remarks
To fill a circle, set the FillColor and FillStyle properties of the object on which the circle or ellipse is drawn. Only a closed figure can be filled. Closed figures include circles, ellipses, or pie slices (arcs with radius lines drawn at both ends).
|
|
__________________
....but then, what would I know ?
|

01-13-2003, 07:35 AM
|
|
Junior Contributor
|
|
Join Date: Dec 2002
Posts: 215
|
|
|
Is there a way to create an object of circle on the fly, with a variable name and everything to use later?
|
|

01-13-2003, 08:05 AM
|
 |
Back for a little while..
Retired Leader * Expert *
|
|
Join Date: Oct 2002
Location: Behind you.....Boo
Posts: 2,199
|
|
|
Try not to hijack another thread.
I don't think you can create shapes as controls but you could create a variable to keep track of all the essential details.
ie,
private type myshape
x as integer
y as integer
radius as integer
colour as long
end type ??
|
__________________
....but then, what would I know ?
|

01-13-2003, 08:06 AM
|
 |
Jedi Coder
* Expert *
|
|
Join Date: Aug 2002
Location: Abingdon, MD
Posts: 3,438
|
|
Try something like:
Code:
Private Sub Command1_Click()
Dim obj As Shape
Static iLeft As Integer
Static iTop As Integer
Static iNum As Integer
iNum = iNum + 1
Set obj = Me.Controls.Add("VB.Shape", "shp" & iNum)
obj.Shape = vbShapeCircle
obj.BackColor = vbRed
obj.Visible = True
iLeft = iLeft + 500
iTop = iTop + 500
obj.Left = iLeft
obj.Top = iTop
obj.Width = 250
obj.Height = 250
End Sub
After creating the control, reference it using the Controls collection and the name - i.e. shp<n>
See here for more info - http://vb.oreilly.com/ron/dynamic.html
|
|

01-13-2003, 10:43 AM
|
|
Junior Contributor
|
|
Join Date: Dec 2002
Posts: 215
|
|
i wasn't hijacking, I dont think..
His question was done, i was continuing on from it, He most likly will be able to use this information too 
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|