Well how can I monitor my microphone level- I have made a project that records sound and I want to add a progressbar that will tell me the level of volume that is being inputed. Here is my sound recorder code.

My Code:
  1. Public Class Form1
  2.  
  3.     Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
  4.  
  5.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  6.  
  7.         Button1.Enabled = False
  8.  
  9.         Button2.Enabled = True
  10.  
  11.         mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
  12.  
  13.         mciSendString("record recsound", "", 0, 0)
  14.  
  15.         Label1.Text = "Recording..."
  16.  
  17.         Label1.Visible = True
  18.  
  19.     End Sub
  20.  
  21.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  22.  
  23.         Button1.Enabled = True
  24.  
  25.         Button2.Enabled = False
  26.  
  27.         Button3.Enabled = True
  28.  
  29.         mciSendString("save recsound c:\recsound.wav", "", 0, 0)
  30.  
  31.         mciSendString("close recsound", "", 0, 0)
  32.  
  33.         MsgBox("File Created: C:\recsound.wav")
  34.  
  35.         Label1.Text = "Stopped..."
  36.  
  37.         Label1.Visible = False
  38.  
  39.         My.Computer.Audio.Stop()
  40.  
  41.     End Sub
  42.  
  43.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  44.  
  45.         Label1.Text = "Playing..."
  46.  
  47.         Label1.Visible = True
  48.  
  49.         My.Computer.Audio.Play("c:\recsound.wav", AudioPlayMode.Background)
  50.  
  51.     End Sub
  52. End Class

The label is a status label- button1=record button, button2=stop button, button3=playback button

THANKS!