• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Simple VB question

Ark

Senior member
Simple question:
I am learning VB6 and looking for folder/file list control which starts with Desktop
silmialr to this

I found so far drive, folder and file old style, but can't find W9x style.

This should not be pop-up window, like MS common dialog, I need to put it on the form.

Thanks
 
I can't believe Windows/VB does not have a build-in control like that.

I know I can build one like that, but I am looking for standard control.
 
Visual Basic does not provide a control that would allow you to do this.
You can populate the list yourself by looking up the shell icons for each folder/drive, or you can check this out (VC++ code), or indeed buy a third-party control for cheap (ComponentSource.com).


GOT IT.

DlgDirListComboBox - look up on Google. It has what you need.
 
Thanks,
I think DlgDirListComboBox is what I need.

Now I have to figure out how to use it.
Any examples in VB?
Simple example for VB beginner?
 
Originally posted by: Ark
Thanks,
I think DlgDirListComboBox is what I need.

Now I have to figure out how to use it.
Any examples in VB?
Simple example for VB beginner?

Google and PlanetSourceCode.com 🙂 I personally don't have any examples, but Google does.

"DlgDirListComboBox function fills the specified combo box with a directory listing. It fills the list with the names of all files, drives, and subdirectories that match the specified attributes and path string"

Win32 API for ya. It's fairly easy.
 
I got DlgDirListComboBox working:
res = DlgDirListComboBox(Form1.hWnd, "C:\", 1, 1, &H4017)

But this is not what I am looking: no tree, no icons

Any ideas?
 
DlgDirListComboBox does just what you're seeing.

If you want the icons, you'll need a 3rd party control that has already written that control or write your own and use the Shell functions to get the icons, plus you'll need to subclass the standard combo box in order to be able to show images and indent levels for the directories you want to display.
 
Back
Top