B
bill_m
Has anyone tried to use the .NET Beep function?
The following works in VBA:
Private Declare Function Beep Lib "Kernel32.dll" _
(ByVal X As Long, ByVal Y As Long) As Long
Dim blVal As Boolean
Dim dwFreq As Long
Dim dwDuration As Long
dwFreq = 1000
dwDuration = 1000
blVal = Beep(dwFreq, dwDuration)
However, it does not work in vb.NET. The .NET beep
function will only play a chime over the Sound card. I
need to use the pc Speaker.
Any Ideas?
The following works in VBA:
Private Declare Function Beep Lib "Kernel32.dll" _
(ByVal X As Long, ByVal Y As Long) As Long
Dim blVal As Boolean
Dim dwFreq As Long
Dim dwDuration As Long
dwFreq = 1000
dwDuration = 1000
blVal = Beep(dwFreq, dwDuration)
However, it does not work in vb.NET. The .NET beep
function will only play a chime over the Sound card. I
need to use the pc Speaker.
Any Ideas?