>>>Hi,
>>>
>>>I need to draw an arrow on a form from x1, y1 to x2, y2. I know how to draw the line, but the arrow part is a riddle to me. I guess it requires a formula and/or some special functions.
>>>
>>>Any idea?
>>
>>I agree that three lines would probably do the job. Tell me if you want help with the math part (trigonometry). Although I haven't figured it out yet, I think it should be easy.
>>
>>Hilmar.
>
>Hi Hilmar,
>
>(BTW, thanks for your reply on 'Public, Private, Global' :)
>
>Some help would be appreciated. Trigonometry is not my specialty.
Use the line() method of the form to draw a line. The method take four params: xOrigin, yOrigin, xDestination, yDestination
But you need to do some calculations in order to draw with differents angles on an arc.
With the following code the angle 0 deg was horizontal.
(0 deg was at 3 on a watch, 90 deg was at 6, 180 at 9, 270 at 12 and 360 at 3)
CenterX=100
CenterY=100
Radius=100
nDeg=30
MyForm.LINE(CenterX,;
CenterY,;
CenterX+(Radius*COS(DTOR(nDeg))),;
CenterY+(Radius*SIN(DTOR(nDeg))))
Play with the forecolor of the form to change the color of the line...
HTH :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca