Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Play Pbc (play Back Control) Media Files In Windows Media Player


i can not play pbc (play back control) media files in windows media player in visual basic program and i try to play in normal windows media player on windows , it can not play too . help me pls , thanks a lot




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Windows Media Player Control.. Random Play Of Playlist Files?
Much as I doubt it, I'm wondering if anyone here has experience with the WMP control using playlists. (I'm using .ASX playlists, if it makes a difference.)

I have the program playing great, everything is wonderful... all I need now is random play. You can set the random/shuffle in the .ASX header, but the MP control ignores it.

Is there a way to randomize things up a bit without actually making your own custom playlist system? I rather like using the ASX files, but if given no choice I suppose I'll have to write my own little method.

Thanks.

How To Reverse Play Back Using Windows Media Player Component.
Dear All,

Can any body help me or have any idea, how to Reverse Playback of video
files like .mpeg,.mpv,.dat using Windows Media Player Component. Or any
other better approach or any 3rd party control(s).

Actually, I am making an application to play the above mentioned video files
in the reverse order.

Please help me, this is very urgent.

Thanx in advance.

Bansi

Play A Media File With Windows Media Player Within The VB Form
I have insterted the windows media player components, and I want to play a file from my local disk in this object.

I tried "WindowsMediaPlayer1.openPlayer SearchingPath & List1" but the file open in a new window media player, not in the form.

Can you tell me how can I do that?

Best regards

Michael Sakellis
Athens-Greece

How To Use Windows Media Player (OCX) The Best Way To Play Midi Files?
Can anyone help me with getting sound out of VB 5 control creator edition?

i mean sound by any sound file
thanks

Windows Media Player Play Problem
Hi,
I'm trying to use a wmp control to play a WAV file from a webserver (located on my LAN) but the wmp.controls.play isn't starting the audio.

My code already works for MP3 files from the same webserver, and it's only by accident I've discovered that it's not working with large WAV files.

What else I noticed is that if I put a break point on the wmp.controls.play statement, and then step to the next line, the wmp control does actually play the WAV.

I've tried putting a pause before the play, used a number of DoEvent statements, used the playerstatechange event to track the newstate variable, but it still won't work.

Any ideas on how to fix this?

Cheers,
Nap

Windows Media Player Looped Play
Hi,
In my application, I have a background audio track playing in the which I would like to loop once it gets to the end.
I have trapped the playstatechanged event and tested for MediaEnded (playstate = 8). However it's not looping back when I use the .previous and .play commands.

Here is my code:

Code:
If (NewState = 8) Then
wmcAudio(1).Controls.stop
wmcAudio(1).Controls.previous
wmcAudio(1).Controls.play
End If


I have tried putting delays and DoEvents inbetween each line but it still doesn't seem to loop for some reason.
However, if I put a breakpoint in the last line, and type the same commands into the "Immediate Window", the track starts up again.
So I'm wondering why it works when I manually do it, but not in code? Is it happening too fast in code?

Anyone have a solution for this?

Cheers,
Nap

Windows Media Player, Load + Play
Very simple,

I put the WMP control in my project and named it "MP"

1. how do I load a file and play it?

2. how can I load a file from an HTTP server and play it

thanks

- kurt

Can Windows Media Player Play From A Buffer
Hi ,

I need to create an application in vb where windows media player plays encrypted media files by decrypting them into a temporay file. The problem is that i cannot create the temporary file on some computers bcos(i do not have system privileges to write to the hard disk). Is there a way to create a buffer and make the media player read from the buffer and play it.
Looks like windows media player doesnt want to play anything other than from a file or URL.

Any ideas are greatly appreciated.

Thanks
Kp

Cannot Get Windows Media-Player To Play An .mpeg File
Class project -- created a form with three tabs in it (selected "SSTab" control from the toolbox) ---> each tab is supposed to have something multimedia in it ... I'm working on one of them ... (still need two more ideas)

[COLOR=orange-red]My inquiry for help is this:[/color]

I have the WINDOWS MEDIA PLAYER in one tab (not ACTIVE MOVIE) and want to play one '.mpeg' file ...

[COLOR=orange-red]I have the following code:[/color]

Private Sub MediaPlayer1_DVDNotify(ByVal EventCode As Long, ByVal EventParam1 As Long, ByVal EventParam2 As Long)
MediaPlayer1.FileName = "C:Program FilesMicrosoft Visual StudioProject10 - Tabsaliensong.mpeg"
MediaPlayer1.Play
End Sub

[COLOR=orange-red]Results are:[/color]

I run the program, no errors occur, I click on the tab for the WINDOWS MEDIA-PLAYER, it displays correctly, I then place the cursor over the controls, they are not clickable but all the "ToolTipText" properties display for each one ... but I cannot play the '.mpeg' file.


I know I do not have the best grasp on this ... What am I missing? Code in the media player routine or other code elsewhere? Is there a property or two that I need to adjust?

Any guidance or suggestions appreciated.
Thank you,
~ Juanita

Play Asf File Using The Media Player Control??
Does anyone know the code for playing an .asf file using the windows media player control?

If not, does anyone know a control i could use to play an asf file?

Justin

Can’t Play Wav File With Windows Media Player After Creating It With MciSendString
I am recording *.wav files with microphone using mciSendString.
I am using the following configuration strings
  i = mciSendString("open new type waveaudio alias capture", 0&, 0, 0)
  i = mciSendString("set capture bitspersample 16", 0&, 0, 0)
  i = mciSendString("set capture samplespersec 44100", 0&, 0, 0)
  i = mciSendString("set capture channels 2", 0&, 0, 0)
  i = mciSendString("set capture alignment 4", 0&, 0, 0) '
  i = mciSendString("Set capture bytespersec 44100", 0&, 0, 0)

I tried setting this last paramter to 176400, but it won’t take anything above 44100.

When I try playing these file(s) with Windows Media Player, I get a "Class not registered" error. However, if I right-click on it, select "Properties" and click on the "Preview" tab, I can play the file back without any problems using the "Preview’s" PLAY button.

Any help would be greatly appreciated.

Sincerely,
Paul D. Goldstein

Can Media Player Control Play Live Radio
HI,

My question is that can media player control supplied with visual basic play live radio or not.

If yes, then how . Should i suppply a streaming radio url and from where to get this streaming radio url.

I have searched for these streaming radio urls but coudlnt find any.

If there is any other control which can do this then please tell me about that.

Urgent help required.

thanks

Play Media Without Media Player?
Is there a way to play a file, for example .wav, without using the MediaPlayer component?

Any Control To Play Media Files In VB?
Any control to play wav files and helps me fix volume etc. of that file?

In fact im new on Vb and doesnt know Vb specific things

How To Play Wav In Media Player?
how to play wav in media player?

How To Play The Media Player Through Vb
hi guys,
we are in a project to play a media player through vb.
here we also wanna adjust the volume, equlizer, slow & speed the sound so and so i need help from you guys, to move on.

How To Play The Media Player OCX By Using The Playlistcollection?
I am trying to play the media player OCX by using the playlistcollection, mediacollection etc. But wasn't able to play it. Does anyone have an idea as to how should I go about it.

Media Player (play Next Song)
im made a mp3 player using vb. What code should i add to make it play the next song automatically. this is my play button code:

Private Sub lbplay_Click()
If GetFromINI("compact mp3 player", "DIRECTORY", App.Path & "mp3.oca") = "" Then
Exit Sub
Else: End If
If File1.ListIndex = -1 Then
Exit Sub
Else
End If
If Form12.MediaPlayer1.PlayState = mpPlaying Then
Form12.MediaPlayer1.Stop
Form12.Timer1.Enabled = False
Form12.lbpause.Enabled = False
Form12.lbstop.Enabled = False
Form12.MediaPlayer1.Open File1.Path & "" & File1.filename
Timer1.Enabled = True
Form12.lbpause.Enabled = True
Form12.lbstop.Enabled = True
Else
Form12.MediaPlayer1.Open File1.Path & "" & File1.filename
Timer1.Enabled = True
Form12.lbpause.Enabled = True
Form12.lbstop.Enabled = True
End If



End Sub

How Can I Get The Media Player To Play Playlists?
i have a decent mp3 player based around the mediaplayer and want to import mutiselected files from a listview box into a playlist to play consecutively any ideas?

Resume Play With Media Player
Hello all,
I created a form in VB.net(2003) that has an embedded media player. Basically I have created all the controls as buttons on the form and I can't figure out how to resume play after I have pause the media file. Does any one know how to resume play of a song that was in play before pausing it or what property I can use to resume play?

Play A MP3 File Without Using Media Player
Hi there!!!

  Is there a way to play a MP3 file without Windows Media Player?, for example, with APIs?, I wanna have my own code. I don't want my program to depend on another program. Thanks!, see you!

Bye!!! Pol1
- trying to make the world graphically better -

Time Length Of Media Files In Windows Media Player
Isn't there a fast easy way to get the time length of a file that has been set as the windows media player.filename?

It seems like there should be but I can't find it.

Anybody else?

Wengang

Media Player Play Time Question
I'm using Media player (msdxm.ocx) To play audio that has it's data stored in a db file.

I am using data from this db to set the MediaPlayer1.SelectionStart and MediaPlayer1.SelectionEnd. Now what I am trying to do is have the Play time displayed. If i use this in a timer


Code:
Label1.Caption = Format$(TimeSerial(0, 0, MediaPlayer1.CurrentPosition), " h:mm:ss")

It works great if I am not using MediaPlayer1.SelectionStart. When using MediaPlayer1.SelectionStart the count jumps to whatever MediaPlayer1.SelectionStart is. So even though the real play time is say 10 seconds, 12 seconds is displayed.

I thought I would be able to do this (ok this works now I had a type-o)


Code:
test = MediaPlayer1.CurrentPosition - MediaPlayer1.SelectionStart
Label1.Caption = Format$(TimeSerial(0, 0, test), " h:mm:ss")

But it does not return milliseconds is there a way to return milliseconds smoothly.

Any thoughts?

ZeroEffect

Stop/pause/play With Media Player
im using mediaplayer control in my vb.. when i use the code


VB Code:
wmPlayer.Controls.pause
and
VB Code:
wmPlayer.Controls.stop
and press the play, they work the same..

all i want to happen is when i pause, it resume the playing.. when i press stop, it totally stop the playing time..

Media Player Finished Video Play?
Is there some way to tell when Media Player has finsihed playing the current video? It most likely has something to do with 'state changes' but I'm not sure how to use it.

And just as a side thought is there some way to get rid of that logo that Media Player starts up with?

Media Player (play When Command Button Is Clicked)
I am a little confused about the Media Player. I cannot get it to where it will play when a user clicks on a command button. I've tried (the name of the player being "wed"):
wed.open "C:My Documentswed.wav"
wed.command = "Play"

I used this b/c another thread said to do that, but an error message pops up in the code. What do I do?????????????

Windows Media 9 Won't Play File..HELP!
Hi ,
I recently downloaded a video clip and then when I finally try open it I got this error message " The content you are trying to access requires an additional level of security , in order to play it you'll need to update your digital rights management installation"

Anyone ever got this kind of message? How do I solve it? Many thanks in advance

M4a Files Support For Windows Media Player Control
Is there a way to have support for m4a files with the Windows Media Player Control?

Or a way to convert them to .mp3?

Play Streaming Windows Media Audio..
Can someone point me in the correct direction to learn how to play a WMA from my website through vB?

(I don't want to download it then play, I want to play while downloading)

Having A Problem With Adding The Windows Media Play To My Form
When I try to add the Windows Media Player component to my form I get an error Class not registered. Looking for object with CLSID:{6BF52A52-394A-11D3-B153-00C04F79FAA6}

Why does this happen and what can I do to fix it?

Play All Type Of Movie In Same Window Using Window Media Player Property
Sir
i am using for play all type of movie file for that i m using Window Media Player property in VB when open first file its ok, and when open next movie file current media player window is closed, and open new media player windows .

I want sir how media player open all movie file in same media player window. i allwayes open movie in fullScreen size and how play all movie continue . i get and stored all movie file names in array like Dim fnam(20)


using code is :---

MP.AutoStart= True
MP.Displaysize=mpFullScreen
MP.filename="fullpath of file"

Thanx sir

Windows Media Player Control
How do I use the Windows Media Player Control?
I want to play a movie, "C:Documents and SettingsTuriyaMy DocumentsMy Videosmovie.wmv"

Using Windows Media Player Control?
How do I work this blasted control! I cant figure out any of it's events to open a file or even play a file!

Is This A Windows Media Player Control Bug?
i made an mp3 player a while back using the windows media player control. i have just recently upgraded to windows media player series 9 and now when i try to compile the program, it gives me an error with all of the media player variable things, like the filename and stop, play and stuff like that. the one i compiled before i upgraded still works fine. i didn't switch to the need windows media player thing because the older control was still availible, but doesn't work the same.

is this a bug or what?

If I Use The Windows Media Player Control?
if i use the control does windows media player needed to be installed to work the control in my program or not?

Windows Media Player Control
I am programming an application that I would like to play an mp3 file with from a list of random MP3's. I would like to use the windows media player control and integrate it into my app, but I have never used this before. I don't have MSDN on my home computer here, so does anyone know how to use this or can you point me in the direction where I can get the calls and or information on this control? Thanks in Advance!

Windows Media Player Control
Hi! I have a question

I have created a program that calculates lenght of all my mp3s that are in folder... I've put them in my listbox...
my code goes like this:

Code:
Dim oMedia As IWMPMedia
Dim dDummy As Double
Dim dDuration As Double
dCalc = 0
For i = 0 To List2.ListCount - 1
Set oMedia = mm.newMedia(List2.List(i))
dDummy = oMedia.duration
dCalc = dCalc + dDummy
Next i

Now, I have a problem... I used Windows Media Player 9 in this, and when I try to run my program on a computer that doesn't have installed Windows Media Player it brings out an error.
I included wmp.dll from my system32 folder with my Package & Deployment installation. And it still doesn't work... I think that I need some kind of OCX and not DLL for this to work...

Now I have a new idea, I've noticed that everyone still have installed the old Windows Media Player 6 on their computer, and it doesn't matter if you installed an newer version. I found it's OCX in Components
it's msdxm.ocx

What's wrong is that my previous code that worked on Windows media Player 9 doesn't work with the old Windows Media Player 6.4...
It gives me error here

Code:
Set oMedia = mm.newMedia(List2.List(i))

newMedia Property or method doesn't exist in the old media player and I don't know how to change my code so it should work, I've tryed all kind of propertyes but it still doesn't work...

If you have an better idea then changing from WMP 9 to WMP 6 by geting WMP 9 to work on every computer, that would be ok, but I think that the best thing to do is to switch to WMP 6

Please help!
Tnx

Control Windows Media Player
Edit by italkid: Split off from THIS thread.
Pardon the gravedigging, but this thread never found a resolution and now i'm looking for the same info. Anybody?

Cheers,
Christopher
Edit by italkid: In the future, please create your own thread instead of hijacking an other, thanks.

Windows Media Player Control
I am using the windows media player (9) control to play wmv video files. However when the video is done playing i want to link to the next form (the video has its own form). I tried...

Private Sub WindowsMediaPlayer1_OpenStateChange(ByVal NewState As Long)
frm1.Hide
frm2.Show
End Sub

But that cuts the video off straight away and goes to the next form. I want it to go to the next form only once the video has finished playing. Thanks in advance.

Windows Media Player Control
I'm using Windows Media Player control and I have this problem:

When I'm playing a play list and I want to change to another one I execute this sentence: "WMP1.currentPlayList.clear", but if the songs list is playing at the moment is loaded from a CD this sentence makes an error, and I can't change "currentPlayList" object any way, although I use "insertItem", "appendItem", etc. So I can't play anymore when I load a list from a CD.

I thought I could create a new "IWMPPlaylist" object and load the new songs into it, to finally assign this object to "currentPlayList", but to do this I have to initializate the object with an empty list and I don't know how to do that.

Anybody can help me with this, please? It's very important for me. Thank you very much.

Windows Media Player Control - Help Please
I'm trying to make Windows Media Player control work on my active x user control. I'm using Windows Media Player 9 control (wmp.dll). Everything works fine. It loads the URL I want it to load and everything, but when I exit the active x page (go on someother website), I can still hear the clip that was being played on the control (on my active x page);meaning it never stopped. Maybe something is wrong with this code, please check:

Private Sub UserControl_Terminate()

WindowsMediaPlayer1.Close

End Sub

I tried using this code through a command button and it worked perfect. Maybe there is something else I'm supposed to use for UserControl. I just want the clip to stop when a user exits the page or closes the window.

Windows Media Player Control
Hello!

I'm doing a project by Visual Basic 6.0 and I have some problems with Windows Media Player Control.

I want to read the audio format sings (.cda format) from a CD. I get the sings name, but I can't play them because the Media Player says me something like that:
"The file you want to play doesn't fit with the format of the file."
But this version of Media Player plays mp3 format. Do I have to get any library to play .cda formats? Is it any wrong with my Media Player version?

My other problem is that when I insert the CD into de CD player the Media Player always runs, and I don't want it, because I use a control in Visual Basic to do that. I know that pressing shift key in the keyboard the Media Player doen't run, but I can't program it.

Could anybody help me with those problems, please? Thanks.

Windows Media Player Control
Hi... I'm adding a feature to a program I've made for control of Windows Media Player. I've already added Winamp, Lime Light (a media player I made), and iTunes (though it's got some problems).
I've gotten most of the wParams using SPY++, Such as Play/Pause, Stop, Forward, Previous, Random,Repeat, and Exit. I'd like to ask for help with getting the current track and artist, Opening a file by giving part (or all) of the title, and Volume Contol.
Currently, I can figure out the last one only by the Up/Down menu buttons, which go in increments of 10. I would like to be able to set a number between 1 and 100 and it would set the volume to that.
Any help on how I can figure this out, or just plain example would be wondeful. Thank you

Windows Media Player 11 Control
i'm having problems using the windows media player 11 activex control. i'm trying to incorperate loop, and shuffle commands with an embedded media player window within my program, but the latest documentation i have is for wmp9, as the wmp11sdk isn't available as a single download without downloading the vista sdk(i don't have vista) so erm really, what i want to know is why this doesn't work:

player.settings.setMode("shuffle", -1)

it tells me there is an expected =

so i counter with

dim x&
x& = player.settings.setMode("shuffle", -1)

it will then highlight .setMode("shuffle, -1) and tell me 'not a valid function' or 'function required'.

if anyone could check later documentation and see if setting the mode for shuffle has changed for wmp11 control, it would be greatly appriciated

Windows Media Player Control
How do you make it play continuously?

I tried playing a sound that lasts for 2 seconds but I wanted it to play continuously(plays again automatically once it's finished) until I want it to stop. I tried using this property:

.AutoRewind -> Read/Write Sets or retrieves a value specifying whether the Windows Media Player control automatically returns to the clip's starting point after the clip finishes playing or has otherwise stopped.

but it seems that it's not recognized as a property for WMP.

And also I tried right-clicking on WMP control while the form is running, and there was an option where it makes it play faster. How do I do that in the code?

Thanks

Windows Media Player Control
Hi,

from the pic, where it says "stop" it says a bunch of things, like:

"playlist: playlist1"

just want to know if thiers a way to remove it these words.

also when i stream video from the web..i thought it would of said buffering if anything but it dont maybe im confusing it with winamp.

also when playing a movie it displays the playing time in bottom right corner, but doesnt show the full movie time lenght atall which is a shame.

How To Use Windows Media Player Control?
I am making a form that allowes the user to listen to music. When the form is loaded, the program searches for all music files and then adds them into a listbox. When a user clicks on it the song is played in the Windows Media Player. I have never used Windows Media Player control before in vb. Could you please help me. I don't even know how to search for music files on a computer. I need help with that too. Could you please guide me?

Windows Media Player Control
Dear All;
I want to use the windows media player in a vb form with a special size on that form and the movie played within that size. Every time the windows media player got bigger than the form according to the size of the movie and I must resize the form which I don't want this. I choose the stretchtofit option and nothing....
thanks

Windows Media Player Control
I need some help or possible code example. I am trying to create a jukebox type program in VB6. I have it set up to where my first form has several command buttons where each will open another form for a specific CD/Album stored on my hard drive and on this second form I will have a list of the songs (mp3 files). I would like to use the Windows Media Player control for each song, however this is my first time using this control and I have no experience. I'm not sure even how to code this and have tried a couple different things but so far it just shows the Media Player control but the play/stop etc. buttons are grayed out and I am lost at this point. I have heard that this is supposedly fairly simple to use but I am stuck. If anyone has any advice I would really appreciate it. Thanks in advance!

Copyright © 2005-08 www.BigResource.com, All rights reserved