View previous topic :: View next topic |
Author |
Message |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 4:50 am Post subject: mp3 player with VB6 |
|
|
i want VB to play a mp3
not itself but starting a player with a mp3 i know i can start the player with shell so how do i make it play a mp3?
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat May 24, 2008 5:03 am Post subject: |
|
|
Use the 'Windows Media Player' component. Google for examples since there are a ton of them around the internet.
_________________
- Retired. |
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 5:07 am Post subject: |
|
|
Wiccaan wrote: | Use the 'Windows Media Player' component. Google for examples since there are a ton of them around the internet. |
wouldnt the user need the component then?
i thought more about the user choosing direction of player first
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat May 24, 2008 5:11 am Post subject: |
|
|
Yes, but in most cases the system will already have Media Player installed, or, you can include the DLL with the program and have it move the DLL and register it when the prog starts.
_________________
- Retired. |
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 5:16 am Post subject: |
|
|
Wiccaan wrote: | Yes, but in most cases the system will already have Media Player installed, or, you can include the DLL with the program and have it move the DLL and register it when the prog starts. |
i wanted to avoid that...
is there no possibility to load a mp3 in a player? or have players a dll i may use?
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat May 24, 2008 5:23 am Post subject: |
|
|
Use a mp3 reading class or something of the sort that requires no external libs and such to read the file.
_________________
- Retired. |
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 5:28 am Post subject: |
|
|
i dont know what you are talking about
and i cant find a media player component i got one but that isnt playing mp3 files
_________________
|
|
Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Sat May 24, 2008 9:15 am Post subject: |
|
|
An example:
Code: | Private Sub Command1_Click()
Dim mPlayer As String
Dim mp3 As String
mPlayer = "C:\Program Files\Windows Media Player\wmplayer.exe"
mp3 = """C:\WINDOWS\Media\Windows XP Startup.wav"""
Shell mPlayer & " " & mp3
End Sub |
Take note of the quotes when setting the mp3 string.
The above is parsing the following to the command line:
Code: | C:\Program Files\Windows Media Player\wmplayer.exe "C:\WINDOWS\Media\Windows XP Startup.wav" |
In the future, please at least try to google the stuff you ask first, or visit: www.pscode.com <- that website is highly renowned for open-source code to help people learn.
|
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 9:22 am Post subject: |
|
|
would that also work with VLC media player for example cause i dont got wmp
_________________
|
|
Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Sat May 24, 2008 9:37 am Post subject: |
|
|
Yep.
|
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 9:46 am Post subject: |
|
|
thanks working
sorry but how do i use it with textbox so user may choose song?
i tried it with just putting text1.text in but he wants to load text1.text then
_________________
|
|
Back to top |
|
 |
|