|
-
Jun 18th, 2004, 08:21 AM
#1
Thread Starter
Member
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.
-
Jun 18th, 2004, 06:34 PM
#2
Sleep mode
There's no DriveListBox ...etc in VS.NET .
-
Jun 20th, 2004, 07:37 AM
#3
Thread Starter
Member
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
-
Jun 20th, 2004, 10:02 AM
#4
Sleep mode
That's imported from VB6 controls .There's no such controls in VB.NET .
-
Jun 20th, 2004, 11:16 AM
#5
Thread Starter
Member
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!
-
Jun 20th, 2004, 03:53 PM
#6
PowerPoster
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.
-
Jun 20th, 2004, 05:26 PM
#7
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:
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
-
Jun 20th, 2004, 06:31 PM
#8
Sleep mode
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
-
Jun 21st, 2004, 12:36 PM
#9
Thread Starter
Member
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!
-
Jun 21st, 2004, 01:11 PM
#10
Sleep mode
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.
-
Jun 21st, 2004, 03:52 PM
#11
Hyperactive Member
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
-
Jun 21st, 2004, 05:25 PM
#12
Thread Starter
Member
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.
-
Jun 21st, 2004, 06:28 PM
#13
PowerPoster
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.
-
Jun 22nd, 2004, 10:03 AM
#14
Hyperactive Member
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:
Dim MP3File As String
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:
Private Sub File1_Click()
Dim MP3File As String
MP3File = File1.Path & File1.FileName
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|