เทคนิคการตรวจสอบ Sound Card
Posted September 7th, 2003 by nattster
เครื่องคอมฯจ๋า เจ้าจะเปล่งเสียงออกมาได้มั้ย
เมื่อเราต้องการตรวจสอบว่าเครื่องมี Sound Card หรือไม่ นี่ก็เป็นโค้ดที่ใช้ตรวจสอบ Sound Card ครับ
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
Private Sub cmdCanPlay_Click()
Dim i As Long
i = waveOutGetNumDevs()
If i > 0 Then
MsgBox "Your system can play sound files.", _
vbInformation, "Sound Card Test"
Else
MsgBox "Your system can not play sound Files.", _
vbInformation, "Sound Card Test"
End If
End Sub
Post new comment