?
Solved

Destop in Drive control

Posted on 2005-04-19
5
Medium Priority
?
144 Views
Last Modified: 2010-05-02
Hi
How to include desktop item in the drive control.
It displays only the drives c,d,e etc.
I want the drive control to act similar to the  "Look in" in vb file open dialog.

thanks
Sri
0
Comment
Question by:krisrajz
  • 2
3 Comments
 
LVL 1

Expert Comment

by:Doodle
ID: 13822197
As far as i know you cant get the desktop item in the drive control how ever if you add a reference to you project to Windows Scripting Runtime, you can access the file system object and loop through the available drives appending them to a combo box, or image combo along with an icon.

    Dim FSO As New FileSystemObject
    Dim Drv As Drive
    For Each Drv In FSO.Drives
        Select Case Drv.DriveType
            Case CDRom
                'Add to combo
            Case Fixed
                'Add to combo
            ...
        End Select
    Next

Hope this helps
0
 
LVL 1

Expert Comment

by:Doodle
ID: 13822264
PS

You can then add custom items that can point any where all you would have to add an a combo_click event with code to redirect you folder window.

c:\Documents and Settings\Username\Desktop
for the desktop.
0
 
LVL 6

Accepted Solution

by:
cjard earned 200 total points
ID: 13833137
use a BrowseForFolder instead:

http://www.vbxsystem.de/en/?downloads.htm


it opens an explorer-like tree. if you have winamp, open the playlist editor and choose ADD DIR, the window that appears is a browseforfolder
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question