Y-a-t-il une autre façon (si possible plus précise) que les contrôles Timer pour manipuler le temps?
D'autre part, j'utilise des fichiers wave (actuellement avec des contrôles MCI), est-il possible d'en régler le volume sonore?
Merci à tous
A voir également:
Débutant cherhce à manipuler TEMPS ET VOLUME SONORE...
Pour le temps
si tu cherche a connaitre un temps ecoulé:
timestart initialise
timerstop renvoie le laps de temps entre l'appel des deux fonctions:
Sub TimerStart()
'// if we do not have the timer frequency, then get it
If secFreq = 0 Then QueryPerformanceFrequency secFreq
'// get the current value
QueryPerformanceCounter secStart
End Sub
Function TimerStop() As Currency
'// get the time passed
Dim secTiming As Currency
QueryPerformanceCounter secTiming
If secFreq = 0 Then
'// there is no high-resolution timer available.
secTiming = 0
Else
'// calculate the time taken from the start value, finish value, and the timer frequency.
TimerStop = Format((secTiming - secStart) / secFreq, "#,00")
End If
End Function
declarations generales:
Public Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Any) As Long
Public Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Any) As Long
'// timer frequency
Dim secFreq As Currency
Dim secStart As Currency