السلام عليكم
اريد السؤال عن كيفية تشغيل صوت في VB.net
غير Bepp()
السلام عليكم
اريد السؤال عن كيفية تشغيل صوت في VB.net
غير Bepp()
You can use system sound by using introp methods to call the sound from your sound mapper
Public Enum MessageBeepType
[Default] = -1
OK = &H0
[Error] = &H10
Question = &H20
Warning = &H30
Information = &H40
End Enum
' This allows you to 'beep' using one of the sounds mapped using the sound mapper in control panel.
<RUNTIME.INTEROPSERVICES.DLLIMPORT("USER32.DLL", setlasterror:= True)> Public Shared Function MessageBeep(ByVal type As MessageBeepType) As Boolean
End Function
' Make a sound using the 'PC Beep' method, allowing you to specify the frequency and duration of the sound.
<RUNTIME.INTEROPSERVICES.DLLIMPORT("KERNEL32.DLL")> Public Shared Function Beep(ByVal frequency As Integer, ByVal duration As Integer) As Boolean
End Function
this will call the standard MessageBox sounds like "Error", "Information" and so on
:to here the specified sound
MessageBeep(MessageBeepType.Information)
note: this subject from an article in a website that I don't remember it's location
رأس الحكمة الإيمان بالله
هذا الموضوع مغلق.