Soyez le premier à donner votre avis sur cette source.
Vue 2 811 fois - Téléchargée 309 fois
Dim v_h, v_m, v_s, v_command As Integer Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long Private dx As Integer, dy As Integer, dwn As Integer Private Type POINTAPI X As Long Y As Long End Type Private Sub b_reduire_Click() Crono.WindowState = 1 End Sub Private Sub b_reset_Click() c_reset End Sub Private Sub b_start_stop_Click() Select Case v_command Case 0 v_command = 1 Case 1 v_command = 2 Case 2 v_command = 1 Case 3 If t_crono.Enabled = True Then v_command = 2 Else v_command = 1 End If End Select c_ss End Sub Private Sub Form_Load() v_command = "0" c_ss End Sub Private Sub Image2_Click() Unload Me End Sub Private Sub t_crono_Timer() If v_s + 1 <= 9 Then v_s = "0" & v_s + 1 Else v_s = v_s + 1 End If If v_s >= 59 Then If v_m + 1 <= 9 Then v_m = "0" & v_m + 1 Else v_m = v_m + 1 End If v_s = "00" End If If v_m >= 59 Then If v_h + 1 <= 9 Then v_h = "0" & v_h + 1 Else v_h = v_h + 1 End If v_m = "00" End If l_crono.Caption = "[" & v_h & ":" & v_m & ":" & v_s & "]" Crono.Caption = "Crono :" & l_crono.Caption t_status.Caption = Crono.Caption End Sub Private Function c_ss() Select Case v_command Case 0 b_start_stop.Caption = "Start" b_reset.Caption = "Reset" v_h = "00" v_m = "00" v_s = "00" v_command = "0" l_crono.Caption = "[" & v_h & ":" & v_m & ":" & v_s & "]" Crono.Caption = "Crono :" & l_crono.Caption t_status.Caption = Crono.Caption Case 1 t_crono.Enabled = True b_start_stop.Caption = "Stop" Case 2 t_crono.Enabled = False b_start_stop.Caption = "Start" End Select End Function Private Function c_reset() v_h = "00" v_m = "00" v_s = "00" l_crono.Caption = "[" & v_h & ":" & v_m & ":" & v_s & "]" Crono.Caption = "Crono :" & l_crono.Caption t_status.Caption = Crono.Caption c_ss End Function Private Sub btitre_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single) dx = X dy = Y dwn = True End Sub Private Sub btitre_MouseMove(button As Integer, Shift As Integer, X As Single, Y As Single) If dwn Then Move Left + (X - dx), Top + (Y - dy) u% = DoEvents End If End Sub Private Sub btitre_MouseUp(button As Integer, Shift As Integer, X As Single, Y As Single) dwn = False End Sub
20 mai 2003 à 02:59
count=scount+1
temp = Fix(sCount / 60)
m = (temp) Mod 60
s = sCount Mod 60
h = (Fix(temp / 60) Mod 24)
l_crono.Caption = format$(h & ":" & m & ":" & s, "hh:mm:ss")
@+ bon coding en esprant ke le tips t aide
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.