Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Circle-Ellipse Drawing

Status
Not open for further replies.

baudouxf

Programmer
Jan 17, 2003
12
BE
Hi evrybody,

I have to draw a circle/ellipse onto a picture contained into a container.
This circle/ellipse has not to be part of this picture - just drawn onto (above) it.

Top of that, is there any instruction to bring to front or send to back a displayed object as 'Format' menu does.

Thanks for your help
 
baudouxf

Take a look at the 'solutions' provided with VFP and look for "Draw lines and shapes on a form". This will get you started.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi

Try this code...
*************************************************
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

*************************************************
*-- Form: form1 (e:\winners8\gl8\form1.scx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 07/04/04 07:10:05 PM
*
DEFINE CLASS form1 AS form

Top = 0
Left = 0
Height = 251
Width = 375
DoCreate = .T.
Caption = "Form1"
Name = "Form1"

ADD OBJECT shape1 AS shape WITH ;
Top = 24, ;
Left = 240, ;
Height = 100, ;
Width = 100, ;
Curvature = 99, ;
BackColor = RGB(0,0,255), ;
Name = "Shape1"

ADD OBJECT commandgroup1 AS commandgroup WITH ;
AutoSize = .T., ;
ButtonCount = 5, ;
Value = 1, ;
Height = 153, ;
Left = 24, ;
Top = 24, ;
Width = 84, ;
Name = "Commandgroup1", ;
Command1.AutoSize = .F., ;
Command1.Top = 5, ;
Command1.Left = 5, ;
Command1.Height = 27, ;
Command1.Width = 74, ;
Command1.Caption = "Circle", ;
Command1.Name = "Command1", ;
Command2.AutoSize = .F., ;
Command2.Top = 34, ;
Command2.Left = 5, ;
Command2.Height = 27, ;
Command2.Width = 74, ;
Command2.Caption = "Square", ;
Command2.Name = "Command2", ;
Command3.AutoSize = .F., ;
Command3.Top = 63, ;
Command3.Left = 5, ;
Command3.Height = 27, ;
Command3.Width = 74, ;
Command3.Caption = "Rectangle", ;
Command3.Name = "Command3", ;
Command4.AutoSize = .F., ;
Command4.Top = 92, ;
Command4.Left = 5, ;
Command4.Height = 27, ;
Command4.Width = 74, ;
Command4.Caption = "Ellipse", ;
Command4.Name = "Command4", ;
Command5.AutoSize = .F., ;
Command5.Top = 121, ;
Command5.Left = 5, ;
Command5.Height = 27, ;
Command5.Width = 74, ;
Command5.Caption = "Quit", ;
Command5.Name = "Command5"

PROCEDURE commandgroup1.Click
ThisForm.shape1.Width = 100

DO CASE
CASE This.Value = 1 && circle
WITH ThisForm.shape1
.Height = .Width
.Curvature = 99
ENDWITH
CASE This.Value = 2 && Square
WITH ThisForm.shape1
.Height = .Width
.Curvature = 0
ENDWITH
CASE This.Value = 3 && Rectangle
WITH ThisForm.shape1
.Height = .Width/2
.Curvature = 0
ENDWITH
CASE This.Value = 4 && Eliipse
WITH ThisForm.shape1
.Height = .Width/2
.Curvature = 99
ENDWITH
CASE This.Value = 5
ThisForm.Release
ENDCASE
ENDPROC

ENDDEFINE
*
*-- EndDefine: form1
**************************************************


____________________________________________
ramani - (Subramanian.G) :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top