473,322 Members | 1,736 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,322 software developers and data experts.

display list of drives in a combo box when dropdown

how to display the list of logical drives in the combo box for DropDown event..?
can any body help me?
Sep 20 '07 #1
2 2050
ammoos
100 100+
Please check the following link…

logicaldiskinfo

It should help you to catch how to get logical drive names. Then try to add that names in to the dropdown list
Sep 20 '07 #2
dip_developer
648 Expert 512MB
how to display the list of logical drives in the combo box for DropDown event..?
can any body help me?
To obtain the available drives, .Net framework provides us with the class Directory. This class is defined in System.IO namespace. This class exposes routines for getting local drives, creating, moving, and enumerating through directories and subdirectories. The method of our interest is Directory.GetLogicalDrives() Method.

try this...........

Expand|Select|Wrap|Line Numbers
  1.  
  2. foreach (String str in Directory.GetLogicalDrives())
  3. {    
  4.             str = str.Replace('\\',' ');
  5.             myComboBox.Add(str);
  6. }
  7.  
Sep 20 '07 #3

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

Similar topics

2
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that...
3
by: Charles | last post by:
I am trying to add the ability for a user to change the order in which the elements are listed in a dropdown list box. Before I added the ListID field the dropdown list box order was controlled...
2
by: Brian | last post by:
Hope you all had a great holiday. I have a subform with a table with a combo box based on a select query. The combo box is set to display in a form in datasheet view. When I click the down...
2
by: Corepaul | last post by:
As input is typed into a text box, I would like to search a recordset for the first record that matches what has been typed so far. I would like to update the text box to display the letters typed...
4
by: Theo Jansen | last post by:
Hi, i'm making an application in Access and in the query made, i'd like the user to fill in a parameter when opening the query (in a report). It's much easier for the user if the parameter was a...
5
by: krwill | last post by:
I'm trying to automate a combo box to add a record to the source table if it's "Not In List". I've tried many different examples and none have worked. Combo Box Name = Combo24 Source Table...
2
by: Exick | last post by:
This is more of a minor annoyance/curiosity than a real problem, but I'm wondering if anyone here can provide some answers. I have a form bound to a table with lots of controls on it that are...
8
by: ardhuru | last post by:
Hello, I am a complete newbie with VB, so this question might sound really stupid; please bear with me. My question is, can a combo box be used to display a value in the sense a label can? I...
6
by: John J. | last post by:
In my combo's list I have for instance these values: AbcdX AbcdY When I press A in the combo, AbcdX gets selected though I need AbcdY to be selected. With Alt-ArrowDown I can dropdown the list,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.