senhas.blogg.se

How to create analog clock in android studio 2.2.3
How to create analog clock in android studio 2.2.3





Y = radius * Math.Sin((2 * Math.PI * secHand / 60) + 1.5 * Math.PI) + formCenter.YĮ.Graphics.DrawLine(secPen, formCenter.X, formCenter.Y, CInt(x), CInt(y)) X = radius * Math.Cos((2 * Math.PI * secHand / 60) + 1.5 * Math.PI) + formCenter.X Y = 0.95 * radius * Math.Sin((2 * Math.PI * minHand / 3600) + 1.5 * Math.PI) + formCenter.YĮ.Graphics.DrawLine(minPen, formCenter.X, formCenter.Y, CInt(x), CInt(y)) Y = 0.7 * radius * Math.Sin((2 * Math.PI * hrHand / 43200) + 1.5 * Math.PI) + formCenter.YĮ.Graphics.DrawLine(hrPen, formCenter.X, formCenter.Y, CInt(x), CInt(y)) Y2 = (radius - 10) * Math.Sin(num) + formCenter.YĮ.Graphics.DrawLine(myPen, CInt(x1), CInt(y1), CInt(x2), CInt(y2))ĭim hrPen As New Pen(Color.LightGreen, 12) X2 = (radius - 10) * Math.Cos(num) + formCenter.X Y1 = radius * Math.Sin(num) + formCenter.Y X1 = radius * Math.Cos(num) + formCenter.X 'Set the radius to the full half-height-40.>įor num As Double = 0 To 2 * Math.PI Step (2 * Math.PI) / 12 Private Sub Form1_Paint(ByVal sender As Object, ByVal e As ) Handles Me.Paint 'hand tick every second instead of a smooth sweeping second hand.> 'If you change the interval to 1000 you will get a second 'and that is only for the second hand, the minute and hour hands are constantly

how to create analog clock in android studio 2.2.3

' 100 here is 1 tenth of a second so 50 lines are drawn every 5 seconds Me.WindowState = FormWindowState.Maximized Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Hi V.K.S.B.K_, Here is my code for an analogue clock taken from this thread.> Option Strict On







How to create analog clock in android studio 2.2.3