Tempo 1.9.0.2
Submitted By:
flydog
Rating:
Not rated (
Rate It)
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Tempo"
ClientHeight = 1470
ClientLeft = 5295
ClientTop = 5130
ClientWidth = 3810
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 1470
ScaleWidth = 3810
Visible = 0 'False
Begin VB.Timer Timer1
Interval = 512
Left = 1418
Top = 8
End
Begin VB.Label Label6
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = -22
TabIndex = 5
ToolTipText = "Data Corrente"
Top = 1088
Width = 3855
End
Begin VB.Label Label5
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = -22
TabIndex = 4
ToolTipText = "Ora Corrente"
Top = 728
Width = 3855
End
Begin VB.Label Label4
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 700
Underline = -1 'True
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 735
Left = 2858
TabIndex = 3
ToolTipText = "Centesimi"
Top = 8
Width = 975
End
Begin VB.Label Label3
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 735
Left = 1898
TabIndex = 2
ToolTipText = "Secondi"
Top = 8
Width = 975
End
Begin VB.Label Label2
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 735
Left = 938
TabIndex = 1
ToolTipText = "Minuti"
Top = 8
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 735
Left = -22
TabIndex = 0
ToolTipText = "Ore"
Top = 8
Width = 1035
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub formatta(T As Long)
Dim o, m, s, c As Integer
s = T 1000
h = (s 3600)
m = ((s - (h * 3600)) 60)
s = (s - (h * 3600) - (m * 60))
c = (T 10) - (h * 360000) - (m * 6000) - (s * 100)
Label1.Caption = Format(h, "00")
Label2.Caption = Format(m, "00")
Label3.Caption = Format(s, "00")
Label4.Caption = Format(c, "00")
Form1.Caption = "Tempo" & " " & Format(h, "00") & ":" & Format(m, "00") & ":" & Format(s, "00") & ":" & Format(c, "00")
Label5.Caption = "Ora corrente: " & Time
Label6.Caption = "Data corrente: " & Date
End Sub
Private Sub Form_Load()
Set T = New TrayIcon '(in un form_load o sub main())
formatta (GetTickCount)
T.SetForm Form1
T.CreaIcona Form1.Caption
End Sub
Private Sub Timer1_Timer()
formatta (GetTickCount)
End Sub
Public Sub EventoTray(Msg As Long)
Select Case Msg
Case WM_LBUTTONDBLCLK
'"Doppio click sinistro"
If Form1.Visible = True Then
Form1.Hide
Else: Form1.Show
End If
Form1.WindowState = 0
Case WM_LBUTTONDOWN
'"Pulsante sinistro giu'"
Case WM_LBUTTONUP
'"Pulsante sinistro su"
Case WM_RBUTTONDBLCLK
'"Doppio click destro"
Case WM_RBUTTONDOWN
'"Pulsante destro giu'"
Case WM_RBUTTONUP
'"Pulsante destro su"
End
Case WM_MBUTTONDBLCLICK
'"Doppio click centrale"
Case WM_MBUTTONDOWN
'"Pulsante centrale giu'"
Case WM_MBUTTONUP
'"Pulsante centrale su"
Case WM_MOUSEOVER
'"MouseMove"
Case Else
'"Evento inaspettato "
End Select
End Sub