الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

سؤال؟؟؟

مغلق
بدأه strong snake في 4 سبتمبر 2004 · 1 رد · 630 مشاهدة · في Microsoft Visual Basic.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

اريد السؤال عن كيفية تشغيل صوت في VB.net

غير Bepp()

#2

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

رأس الحكمة الإيمان بالله

هذا الموضوع مغلق.

مواضيع مشابهة