>Hi all,
>
>is it possible to use shape to make a triangle? or must I use 3 lines to make one? thx in advance!
Hi Jimi,
Rooms and shapes :) AFAIk you can't make a triangle from a shape. You could use lines but you'd have limitations. There is 2 lines in VFP a line object and a line method.
With line method it's easy to draw virtually any shape and syntax is like :
object.Line(Xto, Yto) && Draws a line from current X,Y (CurrentX and CurrentY properties)
object.Line(Xfrom,Yfrom,Xto,Yto) && Start and end x,y parameters
Sounds they're wonderfull ? In a way yes, I created my fastest graphs with them. But wait, big problem 'object' could be a form or _screen and it's a method not object. You just draw. If any object covers it, moving it 'erases' your line. You should redraw when needed. You can't 'bring to front','send to back' etc. It has no methods, events and if you should save drawing you 'have to save-record coordinates while drawing' (quite well with vector apps).
Now you might think it's useless :) It's good to draw a say chart, vector plan, map fast.
Other one (line object) could be used to draw again. It's object, can be moved, sized, zordered has events and methods.
It's somewhat defined with a rectangular region (put one on form to see what I mean). Rectangle's 2 corners define its start and x,y. It's height/width would be tangent, and with sqrt(x2+y2) you could get length too.
One thing you should keep in mind :
Since it's defined by a rectangular 'area' any mouse events would be intercepted as mouse enters its rectangular area. This is the biggest problem and you should write workarounds for it if you need. Other than that mostly what you need is to set height, width and slant (it might be lineslant) properties.
Cetin