Click to See Complete Forum and Search --> : Desktop Root ImageCombo -> Please Help :-(
SulSDK
November 5th, 1999, 05:12 AM
Hello Everybody,
I want a help, I want to use (or make) a combobox witch acts like the one in the browser toolbar.So I need first of all an Imagecombo that I can use like tree ( a tree combo ), and the I want to fill it with system folders ( Desktop then MyComputer etc...). Any thing in any of these issues could be very helpful, so dont hesotate to reply
Best Regards
SulSDK
Chris Eastwood
November 5th, 1999, 05:43 AM
You can use the ImageCombo that comes with VB6 for this - simply add an imagelist (with icons 16x16) to your form and then set the ImageCombo's imagelist property to point to it.
When you come to populate the ImageCombo, use something like :
Dim lCount as Long
'
for lCount = 1 to 10
Call ImageCombo1.ComboItems.Add(, , "Item Description", lCount, , lCount)
next
In the above example, the lCount parameter is being used twice, the first time for the index to the icon in the imagelist, and then again the set the indentation level of the item in the combobox.
You can use the Windows Scripting Host/Control to access all the special folders and drives on your machine to populate the combo with more meaningful data.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
SulSDK
November 7th, 1999, 01:29 AM
Hi Chris,
Thank you for replying my question, but the main purpose for what I asked for is to use the ImageCombo as TreeView concepts (Like adding nodes, deleting nodes, inserting nodes, etc…). But I built a class to solve that proplem.
The most important thing is how can I view the Desktop Icons, and let the combo to deal with them as the following:
Desktop
My Computer
3½ Floppy (A:)
Drive1(C:)
Drive2(D:)
.
.
.
Because of being the Desktop system folder, My Computer system folder etc… is a virtual folders it was very hard for me to track the related APIs witch do that.
Best Regards
SulSDK
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.