Results 1 to 14 of 14

Thread: MP3 Player

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    uk
    Posts
    39

    MP3 Player

    I have created a form and added a Drivelistbox and Dirlistbox and filelistbox and got it allw orking with each other, i was woundering someone could help into once selecting the file from the filelistbox to allow it to play using the windows media player ocx, could anyone help me with that code please.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    There's no DriveListBox ...etc in VS.NET .

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    uk
    Posts
    39
    There is you just have to be smart enough to add it!

    Code:
    Private Sub Drive1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Drive1.SelectedIndexChanged
    Dir1.Path = Drive1.Drive
    Code:
    Private Sub Dir1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dir1.SelectedIndexChanged
    File1.Path = Dir1.PathDir1

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    That's imported from VB6 controls .There's no such controls in VB.NET .

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    uk
    Posts
    39
    there is and that is why i have it created and working! you just need to add the components! and i have it working. you may call me a lier or a noob but its working and its not impossible!

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    Quote from MSDN Help.

    "The Visual Basic 6.0 DriveListBox control was typically used to select or change drives in a File Open or Save dialog box. Visual Basic .NET has no equivalent for the DriveListBox control; however, the Windows Forms OpenFileDialog and SaveFileDialog controls provide the ability to create standard Windows dialog boxes for working with files.

    During upgrade, any existing DriveListBox controls are upgraded to the VB6.DriveListBox control that is provided as a part of the compatibility library (Microsoft.VisualBasic.Compatibility)."

    So. If you are smarter than Microsoft Gurus, you are too smart for us

    If, of course, you have created your own custom control, then you can't expect much help from others without giving the complete code.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  7. #7
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    Priate and Taxes are right, There is no .NET Drives Listbox that is suspose to be used.

    ----

    sk|lance,

    If at all possible you should avoid the use of anything that is included for compadibity

    VB Code:
    1. There is you just have to be smart enough to add it!

    I think that u should rethink this, just a tad. You shouldn't be quick to insult others( Priate is vary capable and respected in this commuity).

    So as taxes previously posted

    During upgrade, any existing DriveListBox controls are upgraded to the VB6.DriveListBox control that is provided as a part of the compatibility library (Microsoft.VisualBasic.Compatibility)."
    and you should not be using it.
    Last edited by <ABX; Jun 20th, 2004 at 05:30 PM.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by taxes
    Hi,

    Quote from MSDN Help.

    "The Visual Basic 6.0 DriveListBox control was typically used to select or change drives in a File Open or Save dialog box. Visual Basic .NET has no equivalent for the DriveListBox control; however, the Windows Forms OpenFileDialog and SaveFileDialog controls provide the ability to create standard Windows dialog boxes for working with files.

    During upgrade, any existing DriveListBox controls are upgraded to the VB6.DriveListBox control that is provided as a part of the compatibility library (Microsoft.VisualBasic.Compatibility)."

    So. If you are smarter than Microsoft Gurus, you are too smart for us

    If, of course, you have created your own custom control, then you can't expect much help from others without giving the complete code.
    Thanks Taxes for clearning this up . That's what I was talking about but I was a little lazy to explain this ...lol

  9. #9

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    uk
    Posts
    39
    http://skclan.skulkrush.com/extras/Drivelistbox.JPG

    http://skclan.skulkrush.com/extras/drivelistbox1.JPG

    These are the pictures with my Drivelistbox within Visual Studio .net with also the filelistbox and dirlistbox. I didnt mean any offense with towards any of you. Also the quote you showed was for Visual Studio .net 2002 not 2003 i have also seen many other application created in Visual Studio .net with drivelistbox!

  10. #10
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by sk|Lance
    http://skclan.skulkrush.com/extras/Drivelistbox.JPG

    http://skclan.skulkrush.com/extras/drivelistbox1.JPG

    These are the pictures with my Drivelistbox within Visual Studio .net with also the filelistbox and dirlistbox. I didnt mean any offense with towards any of you. Also the quote you showed was for Visual Studio .net 2002 not 2003 i have also seen many other application created in Visual Studio .net with drivelistbox!
    Dude , what I'm saying is : There's no pure .NET DriveListBox , FileListBox CONTROLS . Though , you can still use VB6 controls that are wrapped into a .NET controls to be hosted on .NET Windows Forms.

  11. #11
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Hey all, just my two cents worth...

    While Pirate, Taxes and the rest are correct and there are no equivalent File/Directory/Drive list boxes in .NET, you are missing the fundamental part of this poor chaps problem. He wants to know how to select an item in the file list and have the media player control open it.

    The answer is, you will need to concatenate your Drive, Directory and File list selections to build a complete path to your file, then pass that string to the MediaPlayer control and it should be able to open the file.

    John

    btw sk|Lance, if Microsoft says there is no equivalent, what's the point of arguing with the rest of us, Microsoft is the one you need to enlighten with your brilliance, leave us poor dumb programmers alone with our ignorance

  12. #12

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    uk
    Posts
    39
    brillance i do not have i just copied the vb6 code from somewhere else and edited it abit from a vb .net book. The part you just mentioned the creating the path and then string in to media player is that part i need help wtith guys and if you could have any suggestions or help me out i would be very greatful.

  13. #13
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Originally posted by sk|Lance
    http://skclan.skulkrush.com/extras/Drivelistbox.JPG

    http://skclan.skulkrush.com/extras/drivelistbox1.JPG

    Also the quote you showed was for Visual Studio .net 2002 not 2003 i have also seen many other application created in Visual Studio .net with drivelistbox!
    Sorry, but I've just checked my MSDN disks and they ARE 2003.

    Check out this forum for peoples experiences with upgrading projects and see what the problems are.

    I'm checking out of this thread and going to do something constructive like banging my head on the keyboard.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  14. #14
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Well, every control, or other object that is text based in .NET has a Text property. Bearing this in mind, if those controls are truly part of your .NET installation, then each of them should have a .Text property you could use to build your path eg.
    VB Code:
    1. Dim MP3File As String
    2. MP3File = DriveListBox.Text & DirectoryListBox.Text & FileListBox.Text

    But, IF (as most of us already know) they are VB6 controls cleverly embeded into your .NET project then this example will work for you:
    VB Code:
    1. Private Sub File1_Click()
    2.     Dim MP3File As String
    3.     MP3File = File1.Path & File1.FileName
    4. End Sub

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