| Re: Sound in visual basic 6.0 -
06-04-2007, 08:57 AM
Thanks for the reply, but i want to get the wav files from the adocontrol
how do i do this? How do i get the wav files?
"edoepke" <EMAIL REMOVED> schreef in bericht
news:hsidnZLJYd8YGUaiRVn-EMAIL REMOVED...
> This will get you started on how to play music files. Modify it and you
> should be able to get close to what you want.
>
>
>
> Private WithEvents p As MediaPlayer.MediaPlayer
>
> 'Place 2 Command Buttons on your form and name them "cmdPlay" and
"cmdStop".
> To control the volume, place a slider control on your form and 'set the
Min
> to -10000 (No volume) and the Max to 0 (Full Volume). Set the SelStart
> Property to somewhere in the middle of your range. I've also 'placed a
Label
> with the caption "Volume". Now paste the following code into your project.
>
> Private Sub cmdPlay_Click()
> ButtonControl
> p.Volume = Slider1.Value
> 'I've defined MySelection from a selected item in a listbox control
> p.Open MySelection
> End Sub
>
> Private Sub cmdStop_Click()
> p.Stop
> ButtonControl
> End Sub
>
> Public Sub ButtonControl()
> p.Stop
> cmdStop.Enabled = Not cmdStop.Enabled
> cmdPlay.Enabled = Not cmdPlay.Enabled
> Slider1.Visible = Not Slider1.Visible
> Label2.Visible = Not Label2.Visible
> End Sub
>
> Private Sub Slider1_Scroll()
> p.Volume = Slider1.Value
> End Sub
>
> "Jeroen van vliet" <EMAIL REMOVED> wrote in message
> news:brd94f$1d4$EMAIL REMOVED...
> > Hello all,
> >
> > I have an ado control with an access dbase and i want to make a button
> that
> > when its clicked a specified wav or mp3 file will be played in
accordance
> > with each record on the access database. Does anyone know how do do
this?
> >
> > Jeroen
> >
> >
>
> |