Connecting Tech Pros Worldwide Help | Site Map

How to browse Directory in VB.NET

Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#1: 2 Weeks Ago
Dear Sir/Madam

I would like you to help me as below detail.

- I want to create music list in vb.net and store data in SQL Server, I create form and add gridview in the form and i want to load list of music in gridviev and i want to click music on gridview can play and can browse to destination file, but i don't know how to do, Please help me.

I waiting to here from you.


thanks
Best Regards
Kosal
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#2: 2 Weeks Ago

re: How to browse Directory in VB.NET


Database How two parts 1 and 2
How To Use A Database In Your Program
How To Use A Database In Your Program Part II
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#3: 2 Weeks Ago

re: How to browse Directory in VB.NET


Quote:

Originally Posted by Kosal View Post

I want to create music list in vb.net and store data in SQL Server, I create form and add gridview in the form and i want to load list of music in gridviev and i want to click music on gridview can play and can browse to destination file, but i don't know how to do, Please help me

I just realized you have like 5 questions all on one post. I'm sorry I only gave you some help on the one.

So you are really asking:
  1. How do I browse a directory?
  2. How do I put those files in a gridview?
  3. How do I browse to a specific file? ...and...
  4. How do I play the music file I browsed to?
In short you're asking...
  • Will someone tell me how to build my entire application?

I admire your "ignore the shallow end, and jump straight into the deep end" attitude. May I suggest that you learn to crawl before you can walk; and walk before you can run?

Start by learning the simple stuff first.
  • How to use an OpenFileDialog to let the user browse to and select one or more files.
  • How to programatically browse a directory.
  • How to recurssively browse a directory and its subdirectories.
  • How to put those files and folders into a treeview or gridview.
  • How to react to clicks, selections and events of individual rows of a gridview.
  • How to play an mp3 and avi media file.

Right now don't worry about making every part of it work with your final project of yet another mp3 jukebox program. First learn how to do each part separately. Use the MSDN (a link is in my signature block). Use Google to help with parts. For example: You are not the first person to ask "How do I browse a directory in VB.NET". If you Google "VB.NET browse directory" you will find lots of how-to articles.

Then... When you understand how all the parts, and bricks and boards and plumbing work.... Then you can design the program to house all the parts.
Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#4: 2 Weeks Ago

re: How to browse Directory in VB.NET


ok sir thank you for your help,

I will try to find it,
Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#5: 2 Weeks Ago

re: How to browse Directory in VB.NET


Hi I still cannot find any solution everyone can help me

- How do I browse a directory?
- How do I put those files in a gridview?
- How do I browse to a specific file? ...and...
- How do I play the music file I browsed to?
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#6: 2 Weeks Ago

re: How to browse Directory in VB.NET


Quote:

Originally Posted by Kosal View Post

Hi I still cannot find any solution everyone can help me

- How do I browse a directory?
- How do I put those files in a gridview?
- How do I browse to a specific file? ...and...
- How do I play the music file I browsed to?

Wow! I'm stunned. 3 hours of searching on the internet and you couldn't find one example of any of these?

My first Google search for "VB.NET play mp3" got me LOTS of examples.

After checking 2-3 of them I found a 4 line piece of code that claims to do it. I don't code in VB so I can' t confirm it.
Expand|Select|Wrap|Line Numbers
  1. # Dim Sound As New System.Media.SoundPlayer() 
  2. # Sound.SoundLocation = "your path to the .wav file" 'ex.: c:\mysound.wav 
  3. # Sound.Load() 
  4. # Sound.Play()
Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#7: 2 Weeks Ago

re: How to browse Directory in VB.NET


thanks you for your help.
I think you can help me anymore
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#8: 2 Weeks Ago

re: How to browse Directory in VB.NET


The common file dailogs will help for browsing files, and should have been in the first results.
I suspect not a lot of effort was put in
Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#9: 2 Weeks Ago

re: How to browse Directory in VB.NET


can you give me the example for this case

thanks
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#10: 2 Weeks Ago

re: How to browse Directory in VB.NET


http://msdn.microsoft.com/en-us/libr...iledialog.aspx
Kosal's Avatar
Member
 
Join Date: Feb 2007
Location: Phnom Penh
Posts: 58
#11: 1 Week Ago

re: How to browse Directory in VB.NET


thank you sir
let me try
Reply