Public Class Form1 Dim center As Point Dim radius As Double Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 100 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ImageCircle(Me.RectangleToScreen(PictureBox1.DisplayRectangle), Me.RectangleToScreen(PictureBox2.DisplayRectangle)) Timer1.Enabled = True End Sub Private Sub ImageCircle(ByVal rect1 As Rectangle, ByVal rect2 As Rectangle) center = ((rect2.Location) - (rect1.Location)) center.X /= 2 center.Y /= 2 radius = CalcDistance(rect1.Location, center) startDeg = Math.Tan((center.Y - rect1.Top) / (center.X - rect1.Left)) End Sub Private Function CalcDistance(ByVal pos1 As Point, ByVal pos2 As Point) As Double Dim Kou As Double = pos2.X - pos1.X Dim Ko As Double = pos2.Y - pos1.Y Dim Gen As Double Gen = Math.Sqrt(Kou ^ 2 + Ko ^ 2) Return Gen End Function Dim tick As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick tick += 1 PictureBox1.Location = ClacPoint(tick) End Sub Dim startDeg As Double Const MoveUnit As Double = (Math.PI * 2) / 360 Private Function ClacPoint(ByVal tick As Integer) As Point Dim deg As Double = startDeg - (tick * MoveUnit) Dim x As Integer Dim y As Integer x = radius * (Math.Cos(deg)) + center.X y = radius * (Math.Sin(deg)) + center.Y Me.Text = deg & "(" & x & "," & y & ")" Return New Point(x, y) End Function End Class