Results 1 to 3 of 3

Thread: [RESOLVED] Audio Player

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Location
    F.E.V
    Posts
    68

    Resolved [RESOLVED] Audio Player

    i have created an audio player using the wmp control. all was going well untill i found out that i couldnt play a song so i had to manually enter the url in the code behind the program. this caused a problem as i cant now distribute the program as it will only work on my laptop can any one help on how to get the program to work without manual url's or by searching the users pc for the file instantly any help is appreciated.

    The code is

    VB Code:
    1. Private Sub Dir1_Change()
    2.     File1.Path = Dir1.Path
    3. End Sub
    4.  
    5. Private Sub Drive1_Change()
    6.     On Error GoTo DriveHandler
    7.     If Drive1Drive = d Then MsgBox "Make Sure A Disc Is Inserted. (If there is a disc in the drive ignore this message.)"
    8.     Dir1.Path = Drive1.Drive
    9.     Exit Sub
    10.  
    11. DriveHandler: Drive1.Drive = Dir1.Path
    12.     Exit Sub
    13. End Sub
    14.  
    15.  
    16. Private Sub File1_Click()
    17.     If File1.FileName = "Who The ***** Are Arctic Monkeys.mp3" Then WindowsMediaPlayer1.URL = "C:\Documents and Settings\Connah\My Documents\Music\Arctic Monkeys\Other\Who The ***** Are Arctic Monkeys.mp3"
    18. End Sub

    A print screen is attached[IMG]J:\vb screen.JPG[/IMG] http://J:\vb screen.JPG

    sorry if the links dont work but i think the code should be enough
    Attached Images Attached Images  

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Audio Player

    VB Code:
    1. Private Sub File1_Click()
    2.     WindowsMediaPlayer1.URL = File1.Path & "\" & File1.FileName
    3. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Location
    F.E.V
    Posts
    68

    Cool Re: Audio Player

    thanks mate i will try it as im not on my computer at the minute if it doesnt work (which it should) i will ask for more help if thats ok

    thanks anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width