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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving a circle in a circle 1

Status
Not open for further replies.

PockyBum522

Programmer
Joined
Jun 10, 2003
Messages
239
Location
US
I have a shape on my form, is it possible to move it in a circle around a point I specify?
 
Use a Timer control with interval set to 10. Then stick this in the Timer event:

Private Sub Timer1_Timer()
Static Counter As Double
Image1.Left = 2700 + 1000 * (Sin(Counter))
Image1.Top = 1700 + 1000 * (Cos(Counter))
Counter = Counter + 0.005
End Sub

just change the 2700 (twips from left of form) and 1700 (from top) as required. The 1000 mukltiplier sets the circle diameter

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top