Abdelelansari
Messages postés21Date d'inscriptionsamedi 12 janvier 2008StatutMembreDernière intervention29 mars 2008
-
29 mars 2008 à 23:43
cs_alpha5
Messages postés74Date d'inscriptionjeudi 10 août 2006StatutMembreDernière intervention24 mars 2013
-
31 mars 2008 à 21:11
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
cs_alpha5
Messages postés74Date d'inscriptionjeudi 10 août 2006StatutMembreDernière intervention24 mars 2013 31 mars 2008 à 21:11
Excuse moi si je n'ai pas répondu mais je me connecte peu souvent. je vois que l'administrateur et aeder ta répondu à ma place.
aeder
Messages postés14Date d'inscriptionvendredi 26 juin 2009StatutMembreDernière intervention30 mars 2008 30 mars 2008 à 16:33
Salut
et voici la traduction en VB6 / VBA :
Option Explicit
Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal DwFreq As Long, ByVal Dwduration As Long) As Long
Const ½ton = 2 ^ (1 / 12)
Const UT = (LA * ½ton ^ 3) / 2
Const REb = (LA * ½ton ^ 4) / 2
Const RE = (LA * ½ton ^ 5) / 2
Const MIb = (LA * ½ton ^ 6) / 2
Const MI = (LA * ½ton ^ 7) / 2
Const FA = (LA * ½ton ^ 8) / 2
Const SOLb = (LA * ½ton ^ 9) / 2
Const SOL = (LA * ½ton ^ 10) / 2
Const LAb = (LA * ½ton ^ 11) / 2
Const LA = 440
Const SIb = LA * ½ton
Const SI = LA * ½ton ^ 2
Const UT2 = LA * ½ton ^ 3
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim iBeep As Long
Select Case KeyCode
Case 67: iBeep = UT * 2 ^ Shift
Case 68: iBeep = RE * 2 ^ Shift
Case 69: iBeep = MI * 2 ^ Shift
Case 70: iBeep = FA * 2 ^ Shift
Case 71: iBeep = SOL * 2 ^ Shift
Case 72, 65: iBeep = LA * 2 ^ Shift
Case 73, 66: iBeep = SI * 2 ^ Shift
Case 74: iBeep = UT2 * 2 ^ Shift
End Select
APIBeep iBeep, 200 ' do
End Sub
Comme ça, tout le monde en profite
Merci Pythagore
cs_EBArtSoft
Messages postés4525Date d'inscriptiondimanche 29 septembre 2002StatutModérateurDernière intervention22 avril 20199 30 mars 2008 à 14:02
Abdelelansari> Il faut poseder Visual Studio .NET, ouvrir le projet puis dans le menu cliquer sur "Generer la solution"
Abdelelansari
Messages postés21Date d'inscriptionsamedi 12 janvier 2008StatutMembreDernière intervention29 mars 2008 29 mars 2008 à 23:43
Bonsoir alpha5
J'aime bien savoir comment ça marche mais je ne peux pas compiler ce programme avec la manière dont il est exposé
car méme si on télécharge le zip on ne peux pas avoir le fichier exécutable .Une aide aux débutants. Merci
31 mars 2008 à 21:11
30 mars 2008 à 16:33
et voici la traduction en VB6 / VBA :
Option Explicit
Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal DwFreq As Long, ByVal Dwduration As Long) As Long
Const ½ton = 2 ^ (1 / 12)
Const UT = (LA * ½ton ^ 3) / 2
Const REb = (LA * ½ton ^ 4) / 2
Const RE = (LA * ½ton ^ 5) / 2
Const MIb = (LA * ½ton ^ 6) / 2
Const MI = (LA * ½ton ^ 7) / 2
Const FA = (LA * ½ton ^ 8) / 2
Const SOLb = (LA * ½ton ^ 9) / 2
Const SOL = (LA * ½ton ^ 10) / 2
Const LAb = (LA * ½ton ^ 11) / 2
Const LA = 440
Const SIb = LA * ½ton
Const SI = LA * ½ton ^ 2
Const UT2 = LA * ½ton ^ 3
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim iBeep As Long
Select Case KeyCode
Case 67: iBeep = UT * 2 ^ Shift
Case 68: iBeep = RE * 2 ^ Shift
Case 69: iBeep = MI * 2 ^ Shift
Case 70: iBeep = FA * 2 ^ Shift
Case 71: iBeep = SOL * 2 ^ Shift
Case 72, 65: iBeep = LA * 2 ^ Shift
Case 73, 66: iBeep = SI * 2 ^ Shift
Case 74: iBeep = UT2 * 2 ^ Shift
End Select
APIBeep iBeep, 200 ' do
End Sub
Comme ça, tout le monde en profite
Merci Pythagore
30 mars 2008 à 14:02
29 mars 2008 à 23:43
J'aime bien savoir comment ça marche mais je ne peux pas compiler ce programme avec la manière dont il est exposé
car méme si on télécharge le zip on ne peux pas avoir le fichier exécutable .Une aide aux débutants. Merci