-
Ok, say I wanted to make a jukebox. A simple one of course. I would have just 2 buttons. one that said play and one that said next song. My ideas for this jukebox are so that you can play mp3 files that are in the jukeboxes folder. What would I put in the first button |play| and the second |play next| button and in the form?
-
Depends which MP3 control you are using to Play it. For example's sake, say the method is Play then you would use Play "C:\MP3s\MyMp3.mp3"
-
In that case, use can just play it by whatever the FileName is in the FileListBox.
Code:
ChDir App.Path ' Change the Directory to our App path.
MP3Name = File1.filename
Play MP3Name ' Play whatever file is in the FileBox
-
then how...
then how will I make the |play next| button if I put that code in the first?
-
..jumping in here...
..doesn't like the word play..says function not defined..
what am I missing.Option Explicit
Private Sub File1_Click()
Dim mp3Name
ChDir App.Path ' Change the Directory to our App path.
mp3Name = File1.FileName
Play mp3Name ' Play whatever file is in the FileBox
End Sub
Private Sub Form_Load()
' make sure application path is correct before setting path property to avoid problems
If Right(App.Path, 1) = "\" Then
File1.Path = App.Path
Else
File1.Path = "c:\MyFolder All MP3 Files"
End If
' Allow these file extensions to be displayed
File1.pattern = "*.mp3*"