473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to browse Directory in VB.NET

Kosal
68
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
Nov 5 '09 #1
13 4988
tlhintoq
3,525 Expert 2GB
@Kosal
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.
Nov 5 '09 #3
Kosal
68
ok sir thank you for your help,

I will try to find it,
Nov 5 '09 #4
Kosal
68
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?
Nov 5 '09 #5
tlhintoq
3,525 Expert 2GB
@Kosal
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()
Nov 5 '09 #6
Kosal
68
thanks you for your help.
I think you can help me anymore
Nov 5 '09 #7
Plater
7,872 Expert 4TB
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
Nov 5 '09 #8
Kosal
68
can you give me the example for this case

thanks
Nov 6 '09 #9
Kosal
68
thank you sir
let me try
Nov 10 '09 #11
Kosal
68
Hi everyone can help me to give the example as below:

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.
Nov 28 '09 #12
tlhintoq
3,525 Expert 2GB
Two weeks between
thank you sir, let me try
and
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.
As near as I can tell in that time you didn't manage to work out a single issue you had. Is that right?
You are still asking for help on questions that you received answers to. For example, you are still asking for help on how to use the OpenFileDialog even though you were given a link to the MSDN page with complete code for using this. You are still asking how do you play an MP3 when you have been given code for doing so.

With all of the internet at your disposal are you really saying that in 2 weeks you have not manage to use the OpenFileDialog to select a file even after being given this link?
http://msdn.microsoft.com/en-us/libr...iledialog.aspx

Nobody is going to write all your code for you. You have to make an effort of your own.
Nov 28 '09 #13
!NoItAll
297 100+
tlhintoq
You are a VERY patient person!
I'd like to suggest that posts like this get deleted, and if possible, members put on "probation" (if that is even possible). The reason is that posts like this make a mockery of VB - which is already challenged by the programming community as a "toy language."
It ticks me off when half the posts in here are pretty much people asking questions - when they don't appear to even know how to open the IDE.
VB.net is a very powerful tool in the right hands. It's also a wonderful language for those who are learning, or need to program at a more basic level - but posts like this are beyond ridiculous. I don't want to be mean, but students looking to get their homework done for them, or people trying to get others to write code for their managers projects just makes my blood boil.
What's more - one can search these forums for some good info - and threads like this are just useless noise.
Ok - I'm done ranting...
Nov 29 '09 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: mscir | last post by:
I just installed ASP after a couple of years of not using it, PWS Win 98 SE. A couple of things are throwing me, and I can't remember whether these worked in the past. One is I can't...
21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
5
by: deko | last post by:
I'm using the below code to allow users to browse for and select a folder. After selecting a folder from the dialog, the full path is returned to a text box and saved. The next time the user...
5
by: Eric Twietmeyer | last post by:
Hi, Does anyone know why starting with VS.NET 2002 (and same with 2003) it is no longer possible to browse to a directory that has "ept" as part of the path? It worked fine in Vc 6.x. My...
4
by: Larry Brindise | last post by:
I have an asp.net application. I have used VStudio Web Deployment Project to create the MSI file. I copy the MSI file from my developer PC to my test server running Win2003Server Web Edition. I...
2
by: Larry Brindise | last post by:
I have deployed an ASP.NET application successfully on Windows 2000 and 2003. When I deploy it on an XP Pro machine (fresh install with framework 1.1 and IIS installed), I get a very unexpected...
5
by: Mike Moore | last post by:
I need to create something very similiar to the browse folder capability. This would allow me to support the following - A user would create a document on their server, then they would need to...
3
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick() '-- show browse window and Get file path:
7
by: nicknack | last post by:
Hello. I would like to give my user an option to find a directory and choose it. Its just like the FileUpload control but the fileupload control choose only files (if you choose a directory and...
0
by: William Gill | last post by:
I am trying to convert a Python App I wrote that generates html docs from a template. It comes in handy when doing things like photo galleries where dozens of pages are identical except the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.