Le bip

alfred51 Messages postés 2 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 25 septembre 2002 - 25 sept. 2002 à 17:37
cs_MEGATRIX Messages postés 124 Date d'inscription jeudi 3 janvier 2002 Statut Membre Dernière intervention 31 décembre 2011 - 25 sept. 2002 à 18:10
avec vb je sais que l'on peut faire un bip avec la commande du même nom. Mais comment faire les autres sons ?

2 réponses

intello2001 Messages postés 102 Date d'inscription mercredi 11 octobre 2000 Statut Membre Dernière intervention 9 septembre 2003
25 sept. 2002 à 18:03
Pour que sa viene de la tour :

Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long 'L'api

Private Sub Form_Load()
frequence=5000
APIBeep Frequence, 100
End Sub
0
cs_MEGATRIX Messages postés 124 Date d'inscription jeudi 3 janvier 2002 Statut Membre Dernière intervention 31 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

@++
Megatrix
0
Rejoignez-nous