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




Play, Stop, Pause, Loop Play MP-3


respected codeguru users and viewers,

how i can play mp3 file in my program i used mmcontrol and active movie control but not the solution due to lack of experience, can any one help me how its done, thanx for viewing and responsing,




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Play, Stop, Pause, Etc Buttons
Hi there i am trying to manage a number of video files using standard buttons:

Play
Stop
Pause
Skip Forward
Skip Back

I am having big problems!, i can see to get the video to start, but im not sure it is correct, it is using the DoVerb method.

Can anyone help me please?!?!?!?

Alex aka. VB Idiot

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..

Senkey Play, Pause (VB 6.0)
Heey all,

On my keyboard i have some keys for music. Play, pause enz..
How can i send this keys with visual basic 6.0

Thanks in advance

MediaPlayer Play & Pause ??
I have to botton on the form, one is for Play and the other is for Pause... Clicking on Pause botton works fine if the MediaPlayer is playing....if it is not then it gives an error as the MediaPlayer is not playing andy media file....Is there away by which I can make the program knowing if the MediaPlayer is playing media file or not ???

Play Pause Problem
hey ya'll
i mde a button in my mp3 player ( mediaplayer based ) that plays a paused song but i cant play e new song with it can anybody give me a hand

Play Sound Repeatly Without Stop.
Hi to all,

I have a problem, I need to play a sound but I need to detect if this sound is currently playing don't stop or don't play two same sounds, I hope make sense.

I'm using currently PlaySound API.

Thanks !!!!!

Play The Critical Stop Sound
Hi,

How can i play the Critical Stop system sound?

Thanx

How Can I Play Flash File Using A Loop And An Array?
I'd tried to use this code but it only plays the last one, it didn't play the first one.

for example:
flashArray(0) is C:Documents and SettingsJohn-noDesktopflash1.swf
flashArray(1) is C:Documents and SettingsJohn-noDesktopflash2.swf
flashArray(2) is C:Documents and SettingsJohn-noDesktopflash3.swf


vb Code:
For x = LBound(flashArray) To UBound(flashArray)        swfCE.Movie = flashArray(x)        swfCE.Play    Next x

Title Music Won't Play, Need A Way To Play MP3!
I haven't found a way to play my title music yet! I need a way to play an MP3 file!

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

Scrolling Play-by-play
(I consider this "general," as it would apply to status reporting other than for a game. I hope that's okay.)

I've been designing a sports simulation game. It began in QuickBasic, was adapted to VB 3 and is now in VB 5. For the play-by-play window, I'd been using a simple List Box. I add

Code:
frmNarrate.lstPlayByPlay.AddItem Text$
Where Text$ will be something synthesized like "Green Bay lines up, first and ten from their 35 ... ," or "Wilson grounds to short . . . he's out!" Text$ also gets written to a file for a permanent record.

After each addition, I scroll the list to show the latest entry:

Code:
frmNarrate.lstPlayByPlay.TopIndex = frmNarrate.lstPlayByPlay.ListCount - 1

This has served me quite well over several years. However, I'm limited to one text style, size and color. I can change (or let the user change) the entire display, but can't show one team's results in Blue and the other in Red, use bold or italic, that sort of thing.

In reading through this Forum, I was surprised to find that (1) many programmers seem to use a multi-line Text Box for just this sort of thing, and that (2) I ought to consider using a Rich Text Box to full advantage. I presume that it can be made to scroll properly.

I'm going to try these as an alternative just as soon as I get home. Any opinions as to whether it will work, or how difficult the conversion would be? Would using the Rich Text Box add much overhead to the program?

Stop & Pause
what i am trying to do is make it so when u user clicks the "Start" button, it will do something, but then there will also be "Stop" and "Pause" buttons. how can i make it so when the user clicks the "Stop" button, it will stop doing the command the "Start" button gave, and same thing with pressing pause only i can pause it, and then be able to resume it. i hope this isn't too confusing, and makes sense.

-ThX

STOP Or PAUSE The SUB Or FUNCTION.
Is there any possible to STOP or PAUSE the SUB when it is running.

Trying To Stop My Program (Pause)
I've written a program and I would like the ability to stop everything the program is doing and wait until a start button is clicked.

Can anyone help me on this???

How To Play .avi Without WMP
Basically, how do you play an .avi in a specific spot on a form without using the Windows Media Player control?

Play Gif
I need to play a small gif file
when a particular form appears.
Is there any way I can play
this picture
on a form?

Play Mp3
how do you play an mp3 file on a simple form?

How Do You Play OLE
say if i have a OLE that is a powerpoint slideshow can anyone tell me some code how to automaticicly play it without having to double click it instead just by clicking a command button

Play Wav
How can i play a wav file when my form load??

.wav Play
I have this code in a form:

Private Sub Command1_Click()
On Error GoTo E
RetValue = sndPlaySound(App.Path & "REMINDER.wav", SND_ASYNC Or SND_NODEFAULT)
MsgBox "Played .wav successfully", 32, " .wav"
Exit Sub
E:
MsgBox "error", , "error"
End Sub

Private Sub Command2_Click()
End
End Sub

and this code in a module:

Option Explicit
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Const SND_ASYNC = &H1
Public Const SND_LOOP = &H8
Public Const SND_NODEFAULT = &H2
Public Const SND_SYNC = &H0
Public Const SND_NOSTOP = &H10
Public Const SND_MEMORY = &H4
Public RetValue As Boolean

is there anything wrong with this code which would stop the .wav playing, if so please tell me what and how to fix it !!! ???

Thankx

Play Mp3
Hi
How do I play two mp3 files in a row? When I use this code (with the mediaplayer)

mp1.Filename = "c:projectgb.mp3"
mp1.Play

mp1.Filename = "c:projectat.mp3"
mp1.Play

it only plays the second one.

/jon

How To Play Mp3's
I know how to play wave files but how can i play mp3 files in my app ( without a "mp3 player" )

Play Mp3
Hey, Just a simple question today,
how can I play multiple MP3 files at the same time, and how do I control the speed at which it plays?

Play
I know i have asked this question before but didnt get an anwser to it so i am asking again is there ay way of making a mp3 file play when i double click on it in a Filelistbox

Play DVD's?
Hey

I found the Windows Media Player Control.

Now, when you type "WMA1." it comes with with "dvd". If you press "." again, a few options come up. Such as "titlemenu" and "top menu".

So, I have a command button, and in the click event, I have:

WMA1.dvd.Topmenu

This does not work. I need to open the player an begin playing. Any pointers?

Thanks

Play Mp3/
how to play mp3 file on load or on click event
also can we configure to play real player to start in a form

Can VB Play Mp3???
Hi folks,
I’d like to create a small Visual Basic program which would perform the following tasks:
a.Feed a list box with the names of all .mp3 files in a determined directory, let’s say C:My documents
b.Play the chosen .mp3 file by using any VB function or any mp3 player (which would have to run minimized)
c.Allow the user to abort the file playing or return to the program when the file is over.
I have been struggling with some options such as incorporating OLE’s and using the function SHELL, but haven’t got anywhere so far.
I would appreciate any help, even if you happen to know something about just a part of my problem. Thank you so much for taking the time to read my message and trying to help me.
Roselene

Getting WMP 6.4 To Play...
I'd like to open a web radio broadcast station within my Visual Basic project. However I have opted to go with WMP 6.4 (for compatibility reasons) and have run into a snag. I cannot get it to open the http://radio/ or http://radio/listen.pls file without displaying an error message.

Is there any way to make this work or work around this problem?

Thanx in advance

Play Wav But Only When A Value Changes
Hi Guys,

I wrote a program that monitors a device on my comport and at present this checks a value every 5 seconds (I dont want to change this) It updates a text box display and also a plays a voice recording wav file.

Whats annoying is the input remains the same but the voice playback is constantly going and its doing my head in. Ive seperated these routines but im still faced with the same problem. I cant think of a simple way to ONLY play when the input value changes... ie temperature changes...

Can anyone think of a *simple" vb code that only plays the sound ONCE every time the value (temperature) changes?

Ive tried using a string: "storing" the old temperature and comparing the value to the new one - but my code seems to forget the "stored" value when it runs every 5 seconds so it continually plays voice files!!!
What am i doing wrong?

Please help!!!

Play Mp3 Using MCI
Can someone give me a simple example of playing a mp3 using MCI?
Thanks in advance.

Play Mp3
I was using the Playsound API to play wave files, but then i wante dto play a mp3 file with it and all if will play if i do that is the defualt windows ding sound.

here is the line of code i used, works fine with waves, but not with mp3's

Code:
PlaySound "filename.mp3", 0&, SND_FILENAME Or SND_ASYNC

How To Play MP3 ?
How Do I play Mp3's In VB...

Thank you..

Play .flv
hello people ..


am wandering isthere a way to pla a (.flv) extention file on my vb6 form ...???
i trid the shockwaveflash an it didnt work


thanx in advance

Swf Won't Play
I can't play the swf in my vb program even if I have the shock wave flash control in my form


vb Code:
For x = 0 To UBound(crypticArray2)    frmTesting.swfCE(x).Movie = crypticArray2(x)    frmTesting.swfCE(x).PlayNext x

Mp3 Play
Is there anybody here knows how to use the mp3play.ocx?
This might help me with my little project
thanks in advance

Play A Mp3
hi there, I am making a prog and want it to be a tad more cool. I was wondering if there was a simple code, so when you press a button the program itself plays a mp3 file within the programÉ

Thanks

Play MP3 With API
Pz, is there any API codes i can use in playing MP3 files on any Win platform systems?

How To Play A MP3, Need Help!
Hello,
I want to learn how to play any Mp3 song in my programs.
So, when i click on a button it will play a song that i want it to.
What would i use and what would the code me?

Thanks to all that help.
Latez.

Play An AVI
I want to play an avi from a resource file in my project without
using the animation control or having to extract the avi to disk.
Playing an avi without the animation control is not too hard to do,
but how can I play it without extracting it from the resource file
and saving it to disk?

The mciSendstring API requires a file path parameter.

VB Code:
Option Explicit Public Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _(ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, _ByVal hwndCallback As Long) As Long Public Sub PlayAVI(FilePath As String, PlayIn As Object)'Usage: Call PlayAVI("c:mydocumentssample.avi", form1)    FilePath = UCase(FilePath)    If Right(FilePath, 3) = "avi" Then        mciSendString "open " & FilePath & " type AVIvideo alias movie style child parent " & PlayIn.hwnd, 0&, 0, 0    End If    mciSendString "play movie wait", 0&, 0, 0    mciSendString "close movie", 0&, 0, 0    End Sub
Thanks in advance for any assistance.

MMC Play Err...
Hi Programers,
I created movie player using MMC and Picture Box to display video .
The problem is
when a song is playing , user selects another song and click on play buuton without stoping the first one.The second song starts playing without stoping the first one that causes collapse .
Here the first song should stop and second one play.
How can I do this .

Play MP3 Using API
Hello all,


i need to play am MP3 file using API form my VB6 program.

Only play, i dont need stop or pause buttons.

if you have a code to open Media player(or other MP3 default player) good, send it to me

Very thanks!

How To Play WAV, MP3 And MID Using VB6
Hi,

Just asking if there's a way to play a .WAV, .MP3 and .MID files without using ocx? using only API or anything just to play this kind of file using VB6...

If theres a way, can I play them simultaneously?

example:

in Form1, it play "wav.wav"
in Form2, it play "mid.mid"
and in Form3, it play "wav2.wav"

Kindly help me with this project? Attached with this thread are the files to play... (wav.wav, mid.mid, wav2.wav)

Play With OS?
If we do the right click on the "My Computer" icon, the menu is opened as Open
Explore
Search...
Create shortcut
Rename
Properties
Etc.,

If I want to add my own option to that menu and if i click on
that my own program must run.Pls tell me how to do this...in VB.

Thanxs.

How Do You Play Avi's!
How Do You Play Avi's in a form? i have put the avi in to the form but when i test it the movie doesnt play.

Play An MP3
YES! I know this is the MOST asked question on the forums. And YES I did a search but none of the code i got worked. The one that did was extremely long. What is the SHORTEST way to play an MP3 (and loop it)? Without a module if possible (I hate modules) but if I absolutely have to have a module for it to be the shortest possible then I will accept.

Thx in advance.

Play MP3
How can i play a mp3 when i hit a button. it will be in the sound dir. /sound/blah.mp3
How can i do this?

Play Wav With VB
I would like to play .wav or .mp3 file using VB WITHOUT USING OLE OBJECT.

How To Play MP3
Hello All,
Can anyone please tell me how to play a MP3 file using VB?
Please give me cncerned link or any example..
Thanks in advance,
Anita.

How To Play An Mp3?
All I want to know is the code for a program that plays an mp3 named SweetMusic.mp3 when the form is loaded. Thats it!!!!!

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