hey guys! i've been getting better at vb.net and i am very familiar with it now. im not an expert but i know some more vb.net now. anyway, i have some code here:
'Show status
txtboxStatus.Text = "Playing Loading Sound"
'Play recording
Me.BackgroundWorker1.RunWorkerAsync()
End Sub
'This method is executed in a worker thread.
Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
'Perform some time-consuming operation here.
My.Computer.Audio.Play(My.Resources.Sounds.email, AudioPlayMode.WaitToComplete)
Threading.Thread.Sleep(250)
End Sub
'This method is executed in the UI thread.
Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
txtboxStatus.Text = "Ready"
End Sub
what i want to do is make a function for the audio play that can ajust volume. so something like this:
My.Computer.Audio.Play(My.Resources.Sounds.email, AudioPlayMode.WaitToComplete)
My.Computer.Audio.Volume = trkbrVolume.Value
before i had this code:
Imports System.Media
Dim sndPing As New SoundPlayer(My.Resources.Sounds.email)
sndPing.Play()
sndPing.Volume = trkbrVolume.Value
but i want to have the audioplaymode.waittocomplete and volume at the same time. Can u help???
thx!!!