Results 1 to 5 of 5

Thread: how can i make it when i click on a path in a list box it opens as mediaplayer1

  1. #1
    Guest

    Post

    I am making an mp3 jukebox which seaches for mp3s on my hardrive then lists the results in a list box
    i can make a button play a specific mp3 by using
    MediaPlayer1.Open "D:\Dr. Dre - Forgot about DRE.mp3"
    how can i use that code and have the path in the list box become the "D:\Dr. Dre - Forgot about DRE.mp3"???

    if u know of anything that will help me please tell me!








  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    in the listbox click event use the property list1.list(list1.listindex) to access the item you clicked on, i'm not sure if that's what you wanted? Maybe you already know how to use mediaplayer?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Guest
    ok thanx for that but i uses this code

    Private Sub lstFoundFiles_Click()
    MediaPlayer1.Open "lstFoundFiles.list"
    End Sub

    1stfoundfiles being the listbox
    and all that happens is the stop button flashes from disabled to enable for a second

    i really need help!

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    List is a indexed property, use it like this:
    Code:
    MediaPlayer1.Open lstFoundFiles.list(lstFoundFiles.listindex)
    no quotation marks either
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Guest

    Talking

    Sick
    Thanx man it actually works!!!
    i have just started with vb
    like 3 weeks ago and i know a few things now
    skool doesnt teach me anything i teach my teacher how to do stuff on the comps so i have to learn myself!!
    anyway thanx a lot

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