Hackers Guide to Visual FoxPro 7.0
Box, Circle, Line, Cls
These form methods let you draw rectangles, circles and ellipses, and lines on forms, and then get rid of them.| Usage | frmForm.Box( [ nLeft, nTop, ] nRight, nBottom ) frmForm.Circle( nRadius [, nCenterX, nCenterY [, nAspectRatio ] ] ) frmForm.Line( [ nLeft, nTop, ] nRight, nBottom ) |
| | Circle does weird things with negative aspect ratios. For absolute values up to 1, negative and positive aspect ratios give the same results. But, with an absolute value greater than 1, a negative aspect ratio results in an ellipse larger than one with the same positive aspect ratio. Frankly, the whole thing smells like a bug. Circle shouldn't even accept a negative aspect ratio. |
These items are drawn in the form's ForeColor and respect the settings of DrawMode, DrawStyle, DrawWidth, FillColor and FillStyle.
Shapes created in this way are different than those created with the Shape control. These are just images on the form, like the @ SAY commands of years gone by. They don't have properties, events or methods. In addition, while the shapes are initially drawn on top of any controls, they can fall behind other objects when the display is refreshed or that control gets focus.| Example | ThisForm.Box(50, 50, 100, 100) ThisForm.Circle(25, 100, 100) ThisForm.Circle(40, 20, 70, .5) ThisForm.Line(100, 200) |
| Usage | frmForm.CLS() |
| See Also | @...Box, @...Say, @...To, Clear, Clear Method, CurrentX, CurrentY, DrawMode, DrawStyle, DrawWidth, FillColor, FillStyle, ForeColor, Print, PSet, ScaleMode, Shape |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.
Категории