🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual
4 messages
4 total messages Started by peter Tue, 17 Jun 2003 15:06
WindowsMediaPlayer
#230
Author: peter
Date: Tue, 17 Jun 2003 15:06
8 lines
1394 bytes
Hello,

I built in the WindowsMediaPlayer in a form, but I can't get it working.
Does anayone have some sample-code for me?

Thanks,

Peter
Re: WindowsMediaPlayer
#231
Author: Frank Adam
Date: Tue, 17 Jun 2003 17:57
20 lines
1545 bytes
On Tue, 17 Jun 2003 17:06:40 +0200, "peter" <iwi@iwi.myweb.nl> wrote:

>Hello,
>
>I built in the WindowsMediaPlayer in a form, but I can't get it working.
>Does anayone have some sample-code for me?
>
May be a silly question, but what exactly doesn't work ? 

Private Sub PlayFile(s as string) 's = your path to a media file
	WMP.FileName = s 
	WMP.Play
End Sub

If that doesn't work, then you may be setting a file that is not
supported by the media player.

-- 

Regards, Frank
Re: WindowsMediaPlayer
#238
Author: peter
Date: Wed, 18 Jun 2003 08:03
45 lines
2529 bytes
"Frank Adam" <fajp@xxxxoptushome.com.au> wrote in message
news:3eef5503.5091644@news-vip.optusnet.com.au...
> On Tue, 17 Jun 2003 17:06:40 +0200, "peter" <iwi@iwi.myweb.nl> wrote:
>
> >Hello,
> >
> >I built in the WindowsMediaPlayer in a form, but I can't get it working.
> >Does anayone have some sample-code for me?
> >
> May be a silly question, but what exactly doesn't work ?
>
> Private Sub PlayFile(s as string) 's = your path to a media file
> WMP.FileName = s
> WMP.Play
> End Sub
>
> If that doesn't work, then you may be setting a file that is not
> supported by the media player.
>
> -- 
>
> Regards, Frank

What I did is:

1. create a form

2. put the Windows Media player on it

3. doubleclcked the "PLAY"-button to add the code I need to play the file
"c:\temp\heaven.mp3"

When I typede the code: "WindowsMediaPlayer1." I got a listbox with lots of
items but not the ones you mentioned (Filename, Play).

double-clicking the play-button gave me the following:



Private Sub WindowsMediaPlayer1_OpenStateChange(ByVal NewState As Long)

' WHAT CODE HERE?

End Sub
Re: WindowsMediaPlayer
#240
Author: FoSweb
Date: Wed, 18 Jun 2003 11:11
26 lines
1873 bytes
You are using the newer WMP control...

Simply use the player.URL = Filename to set the file you want to play.
Also, this doesnt go where you have 'WHAT CODE HERE
But in the place where you load your file...

Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/
vb_player_article.asp

Michael.


> double-clicking the play-button gave me the following:
>
>
>
> Private Sub WindowsMediaPlayer1_OpenStateChange(ByVal NewState As Long)
>
> ' WHAT CODE HERE?

Dont put the code for loading files here. Put code for what happens when the
user presses one of the WMP control buttons here.

>
> End Sub
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads