943,758 Members | Top Members by Rank

Ad:
Apr 6th, 2008
0

All Drive

Expand Post »
how i can get all drive in my computer?
does anyone know how to get it??

Thanks.
Similar Threads
Reputation Points: 34
Solved Threads: 1
Light Poster
Neji is offline Offline
28 posts
since Feb 2008
Apr 6th, 2008
5

Re: All Drive

yes, here it is the code, try it and let me know if it worked :
vb Syntax (Toggle Plain Text)
  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...
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Apr 7th, 2008
0

Re: All Drive

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Apr 7th, 2008
0

Re: All Drive

yes.. got it.
thank you all.
Reputation Points: 34
Solved Threads: 1
Light Poster
Neji is offline Offline
28 posts
since Feb 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: MDI Form
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: GetSystemInfo (API Function)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC