Attribute VB_Name = "mMain"
Option Explicit
Public mil As Byte, sec As Byte, min As Byte, ore As Byte, az As Byte, nul As Byte, cron As Long, filedir As String, glPid As Long
Public Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Public Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Public Const ICC_USEREX_CLASSES = &H200
Public Sub Main()
On Error Resume Next
Dim iccex As tagInitCommonControlsEx
With iccex
.lngSize = LenB(iccex)
.lngICC = ICC_USEREX_CLASSES
End With
InitCommonControlsEx iccex
On Error GoTo 0
MsgBox App.Title & " è stato realizzato Giuseppe Cazzato" & Chr(13) & "Per info: giuseppec87@libero.it", vbInformation, App.Title
Load Form2
Form2.Show
End Sub
Public Function Controlla()
Dim strin_g As Byte, strin_o As Byte, strin_m As Byte, strin_s As Byte
'Controllo secondi
strin_s = Len(Form1.sec_t.Caption)
If strin_s = 1 Then
Form1.sec_t.Caption = "0" & Val(sec)
End If
'Controllo minuti
strin_m = Len(Form1.min_t.Caption)
If strin_m = 1 Then
Form1.min_t.Caption = "0" & Val(min)
End If
'Controllo ore
strin_o = Len(Form1.ore_t.Caption)
If strin_o = 1 Then
Form1.ore_t.Caption = "0" & Val(ore)
End If
'Controllo giorni
strin_g = Len(Form1.cron_t.Caption)
If strin_g = 2 Then
Form1.cron_t.Caption = "0" & Val(cron)
ElseIf strin_g = 1 Then
Form1.cron_t.Caption = "00" & Val(cron)
End If
'Controllo finito
End Function