- Option Explicit
- Const T As Double = 57.29577951
- Private Sub Form_Load()
- Me.Height = 7000
- Me.Width = 7000
- End Sub
- Private Sub Form_Resize()
- Me.ScaleHeight = 100
- Me.ScaleWidth = 100
- End Sub
- Private Sub Timer1_Timer()
- Dim H As Long, M As Long, S As Long
- Dim Hd As Double, Md As Double, Sd As Double
- Dim Hr As Double, Mr As Double, Sr As Double
- Dim x As Double, y As Double
- Dim p As Double, i As Double, a As Double, b As Double
- Dim x1 As Double, y1 As Double
- Me.Cls
- Me.Circle (Me.ScaleWidth / 2, Me.ScaleHeight / 2), 49, vbBlack
- Me.Circle (Me.ScaleWidth / 2, Me.ScaleHeight / 2), 48, vbBlack
- Me.FillStyle = 0
- Me.Circle (Me.ScaleWidth / 2, Me.ScaleHeight / 2), 1, vbBlack
- Me.FillStyle = 1
- x = Me.ScaleWidth - 4
- y = Me.ScaleHeight - 4
- a = Me.ScaleWidth
- b = Me.ScaleHeight
- For i = 1 To 12
- p = i * 30 - 90
- If p < 0 Then p = p + 360
- x1 = y / 2 + (y / 2 * 0.9 * Cos(p / T))
- y1 = x / 2 + (y / 2 * 0.9 * Sin(p / T))
- Me.CurrentX = x1 + 0.2
- Me.CurrentY = y1 + 0.2
- Me.Print i
- Next
- H = Hour(Time): M = Minute(Time): S = Second(Time)
- lblTime.Caption = "Current Time - " & H & ":" & M & ":" & S
- If H >= 12 Then H = H - 12
- Hd = H * 30
- Hd = Hd + M / 2
- Md = M * 6
- Sd = S * 6
- Hd = Hd - 90: Md = Md - 90: Sd = Sd - 90
- If Hd < 0 Then Hd = Hd + 360
- If Md < 0 Then Md = Md + 360
- If Sd < 0 Then Sd = Sd + 360
- Hr = Hd / T: Mr = Md / T: Sr = Sd / T
- Line (Me.ScaleWidth / 2, Me.ScaleHeight / 2)-(Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.75 * Cos(Hr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.75 * Sin(Hr))), vbBlack
- Line (Me.ScaleWidth / 2, Me.ScaleHeight / 2)-(Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.85 * Cos(Mr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.85 * Sin(Mr))), vbBlue
- Line (Me.ScaleWidth / 2, Me.ScaleHeight / 2)-(Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.8 * Cos(Sr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.8 * Sin(Sr))), vbRed
- Me.FillStyle = 0
- Me.Circle (Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.75 * Cos(Hr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.75 * Sin(Hr))), 1, vbBlack
- Me.Circle (Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.85 * Cos(Mr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.85 * Sin(Mr))), 1, vbBlue
- Me.Circle (Me.ScaleHeight / 2 + ((Me.ScaleHeight / 2) * 0.8 * Cos(Sr)), Me.ScaleWidth / 2 + ((Me.ScaleHeight / 2) * 0.8 * Sin(Sr))), 1, vbRed
- Me.FillStyle = 1
- End Sub
Tuesday, 14 February 2017
Code of Digital and Analog Clock
About Something Different (Study Materials,New Think)
Author Description here.. Nulla sagittis convallis. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
Subscribe to:
Post Comments (Atom)
Labels
- Android
- BCA
- C++
- Coding
- Computer Graphics
- DBMS
- Electronics
- English Tutorial
- java
- JSP
- JSP Architectures
- MCA
- MIS
- Operating System(OS)
- Program
- Run Command
- Study Materials
- System Simulation
- Technology
- Tip and Tricks
- VC++
- Visual Basic
- Web Technology
- XML
- टैकनोलजी
- हिंदी ट्यूटोरियल
- ইলেকট্রনিক্স
- ওয়েব ডেভলাপমেন্ট
- টেকনোলজি
- ডিজাইন
- দ্বিতীয় শ্রেণী
- প্রথম শ্রেণী
- প্রাক্ প্রাথমিক শ্রেণী
- ফেসবুক
- বাংলা টিউটোরিয়াল
- মোবাইল
No comments:
Write comments