cs_MEGATRIX
Messages postés124Date d'inscriptionjeudi 3 janvier 2002StatutMembreDernière intervention31 décembre 2011 25 sept. 2002 à 18:10
Salut; Voici ce qui t'aidera!
Private Declare Function Beep Lib "kernel32.dll" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Declare Function GetTickCount Lib "kernel32" () As Long
Public Sub xWait(ByVal MilsecToWait As Long)
Dim lngEndingTime As Long
lngEndingTime = GetTickCount() + (MilsecToWait)
Do While GetTickCount() < lngEndingTime
DoEvents
Loop
End Sub
Private Sub Command1_Click()
For i = 0 To 50
Beep 1500 - i * 15, 50
Next
xWait 100
Beep 100, 1000
End Sub
Private Sub Command2_Click()
For i = 0 To 2
Beep 1000 + i * 200, 100
Next
xWait 100
For a = 0 To 3
Beep 1400 - i * 200, 100
Next
End Sub
Private Sub Command3_Click()
Beep 900, 5000
End Sub