System sound vb.net on XP

Is it possible for vb.net to play the internal speaker of a PC? you know the one that produces C \aBELL I tried beep(), but it only produces the error sound on the sound card. I also tried

<Runtime.InteropServices.DllImport("KERNEL32.DLL", EntryPoint:="Beep", SetLastError:=True, _
CharSet:=Runtime.InteropServices.CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall)> _
Public Shared Function _
   aBeep(ByVal dwFreq As Integer, ByVal dwDuration As Integer) _
     As Boolean
End Function

Without joy, apparently, this is the only advantage in Vista and above. Any suggestions?

+5
source share
1 answer

My VB.NET, , My.Computer.Audio. Play , .wav , PlaySystemSound, enum, Beep. , :

My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep)

, .Net framework, , XP Vista...

+3

All Articles