IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Visual Basic (https://www.ircforumlari.net/visual-basic/)
-   -   Analog Saat (https://www.ircforumlari.net/visual-basic/124433-analog-saat.html)

Cemalizim 19 Temmuz 2008 16:54

Analog Saat
 
ALINTIDIR

PHP- Kodu:

'Forma bir adet timer ekleyin
 
Dim cSize As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
Const PI = 3.14159
 
Private Sub Form_DblClick()
    End
End Sub
 
Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then
        End
    End If
End Sub
 
Private Sub Form_Load()
If App.PrevInstance Then End
    cSize = CreateEllipticRgn(4, 23, 270, 290)
    SetWindowRgn Me.hWnd, cSize, True
    Call Timer1_Timer
End Sub
 
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Dim ReturnValue As Long
   If Button = 1 Then
      Call ReleaseCapture
      ReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
   End If
End Sub
 
Private Sub Timer1_Timer()
    Dim H As Single, M As Single, S As Single
    Dim TotHours As Single
 
    H = Hour(Time)
    M = Minute(Time)
    S = Second(Time)
    TotHours = H + M / 60
 
    LH.X2 = 700 * Cos(PI / 180 * (30 * TotHours - 90)) + LH.X1
    LH.Y2 = 700 * Sin(PI / 180 * (30 * TotHours - 90)) + LH.Y1
 
    LM.X2 = 1200 * Cos(PI / 180 * (6 * M - 90)) + LH.X1
    LM.Y2 = 1200 * Sin(PI / 180 * (6 * M - 90)) + LH.Y1
 
    LS.X2 = 1200 * Cos(PI / 180 * (6 * S - 90)) + LH.X1
    LS.Y2 = 1200 * Sin(PI / 180 * (6 * S - 90)) + LH.Y1
 
End Sub 



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 21:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk