TheScott18
01-13-2003, 07:02 AM
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?
form1.line (x1,y1) - (x2,y2), , BF
How do I go about making a filled circle?
Filling in CirclesTheScott18 01-13-2003, 07:02 AM 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? Garmour 01-13-2003, 07:04 AM Read the vb help The first line in the remarks begins.... 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.. TheScott18 01-13-2003, 07:06 AM but what's the syntex to filling them? Garmour 01-13-2003, 07:08 AM huh ??? set the FillColor and FillStyle properties of the object on which the circle So that would be your form1 ie, form1.fillcolor TheScott18 01-13-2003, 07:09 AM Ok, I get it. It's not like with boxes that there's a peramtier that you can set. Thanks. Garmour 01-13-2003, 07:11 AM No, it's not like boxes. It's the way it says in the help :) 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). mjs7231 01-13-2003, 07:35 AM Is there a way to create an object of circle on the fly, with a variable name and everything to use later? Garmour 01-13-2003, 08:05 AM 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 ?? Machaira 01-13-2003, 08:06 AM Try something like: 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 mjs7231 01-13-2003, 10:43 AM 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 :) |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum