Tuesday, 17 January 2012

Sound Card Detection

 For this we need 2 controls.        1. Label                 2.Button
 

Declare Function waveOutGetNumDevs Lib "Winmm.dll" () As Long

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = SoundCardAvailable()
    End Sub

Public Function SoundCardAvailable() As Boolean
        If waveOutGetNumDevs() > 0 Then
            SoundCardAvailable = True
        Else
            SoundCardAvailable = False
        End If
    End Function

No comments:

Post a Comment