PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
'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