VB uses Radians, not degrees for all of its trig. Remeber

to convert from one to the other to make sure everthing

works out fine.

2PI radians = 360 degrees.

1Pi radians = 180 degrees.

The code below draws a second hand on a clock face

using trig and radians.

Private Sub DrawSeconds()

Dim x As Double

Dim y As Double

Dim x1, y1 As Double

Dim myPen As New Pen(Color.Black, 1)

Dim rads As Double = ((Second * 6) - 180) * (PI / 180)

x = Centre.X - (((FaceWidth / 2) - 10) * Sin(rads))

x1 = Centre.X - (10 * Sin(rads))

y = Centre.Y + (((FaceWidth / 2) - 10) * Cos(rads))

y1 = Centre.Y + (10 * Cos(rads))

g.DrawLine(myPen, CInt(x1), CInt(y1), CInt(x), CInt(y))

End Sub

Good luck.

On Wed, 18 Aug 2004 12:03:53 -0400, "Jeff Johnson [MVP: VB]"

<i.***@enough.spam> wrote:

"Magic Gooddy" <go****@rambler.ru> wrote in message

news:uq*************@TK2MSFTNGP11.phx.gbl...

How to rotate one button around another like Sun and Planet?

Sample, please!

I don't have a sample, but I can suggest a direction. You just need to use a

little trigonometry to calculate the x and y coordinates that the revolving

button will need as you go from 0 to 360 degrees. Cosine will give you the x

and Sine will give you the y.