Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Conto alla rovescia - mMain.bas

mMain.bas

Caricato da: Natamas
Scarica il programma completo

  1. Attribute VB_Name = "mMain"
  2. Option Explicit
  3. 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
  4. Public Type tagInitCommonControlsEx
  5.    lngSize As Long
  6.    lngICC As Long
  7. End Type
  8. Public Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
  9. Public Const ICC_USEREX_CLASSES = &H200
  10.  
  11. Public Sub Main()
  12. On Error Resume Next
  13.    Dim iccex As tagInitCommonControlsEx
  14.    With iccex
  15.        .lngSize = LenB(iccex)
  16.        .lngICC = ICC_USEREX_CLASSES
  17.    End With
  18.    InitCommonControlsEx iccex
  19.    On Error GoTo 0
  20.    MsgBox App.Title & " è stato realizzato Giuseppe Cazzato" & Chr(13) & "Per info: giuseppec87@libero.it", vbInformation, App.Title
  21.    Load Form2
  22.    Form2.Show
  23. End Sub
  24.  
  25. Public Function Controlla()
  26. Dim strin_g As Byte, strin_o As Byte, strin_m As Byte, strin_s As Byte
  27. 'Controllo secondi
  28. strin_s = Len(Form1.sec_t.Caption)
  29. If strin_s = 1 Then
  30. Form1.sec_t.Caption = "0" & Val(sec)
  31. End If
  32. 'Controllo minuti
  33. strin_m = Len(Form1.min_t.Caption)
  34. If strin_m = 1 Then
  35. Form1.min_t.Caption = "0" & Val(min)
  36. End If
  37. 'Controllo ore
  38. strin_o = Len(Form1.ore_t.Caption)
  39. If strin_o = 1 Then
  40. Form1.ore_t.Caption = "0" & Val(ore)
  41. End If
  42. 'Controllo giorni
  43. strin_g = Len(Form1.cron_t.Caption)
  44. If strin_g = 2 Then
  45. Form1.cron_t.Caption = "0" & Val(cron)
  46. ElseIf strin_g = 1 Then
  47. Form1.cron_t.Caption = "00" & Val(cron)
  48. End If
  49. 'Controllo finito
  50. End Function