All Drive

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Feb 2008
Posts: 25
Reputation: Neji is an unknown quantity at this point 
Solved Threads: 1
Neji's Avatar
Neji Neji is offline Offline
Light Poster

All Drive

 
0
  #1
Apr 6th, 2008
how i can get all drive in my computer?
does anyone know how to get it??

Thanks.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: All Drive

 
5
  #2
Apr 6th, 2008
yes, here it is the code, try it and let me know if it worked :
  1. Dim AllDir
  2. Private Sub Form_Load()
  3. On Error Resume Next
  4. For i = 65 To 90
  5. x = Dir(Chr(i) & ":\", vbDirectory + vbHidden + vbSystem)
  6.  
  7. If Err = 52 Then
  8. Err.Clear
  9. Else
  10. If x <> "" Then AllDir = AllDir & (Chr(i) & ":\")
  11. Err.Clear
  12. End If
  13.  
  14. Next i
  15. MsgBox AllDir
  16. End Sub
Hope this helps...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: All Drive

 
0
  #3
Apr 7th, 2008
Hi,

One more Simple way:

Add a DriveListBox on the form and loop thru all the list items.. it lists all the drives

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: Neji is an unknown quantity at this point 
Solved Threads: 1
Neji's Avatar
Neji Neji is offline Offline
Light Poster

Re: All Drive

 
0
  #4
Apr 7th, 2008
yes.. got it.
thank you all.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 623 | Replies: 3
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC