Important alert: (current site time 7/16/2013 2:38:35 AM EDT)
 

winzip icon

McListBox 3.3 (Hybrid)-[With ListBox,FileList,FolderList,DriveList,FileBrowser, FolderBrowser modes]

Email
Submitted on: 2/13/2006 2:14:08 AM
By: JJJJJJJJ  
Level: Intermediate
User Rating: By 33 Users
Compatibility: VB 6.0
Views: 32036
(About the author)
 
     Added features... 1) Horizontal ScrollBars 2)Drive's Label 3)New tree view line style : McListBox 3.2 is the hybridized version of ListBox,FileList,FolderList,DriveList,FileBrowser(with filter) and FolderBrowser. The control will extract the true icons (16*16,32*32) , such that the items will have the same icons that the explorer is showing. The FileBrowser and FolderBrowser modes are auto-responding... ie you can open the folder by DbClicking on the list item. Apart from the previous version, in the new version it is not neccessay that you REFRESH the control to show the items, the List will be automatically refreshed. The control is more than 4 times faster than vb's ListBox. I am submitting this as a new post, bcose I wish to keep the old (Listbox only) version as it is. Features includes... Item completer, Subclassing, Api scrollbars, XP style, Mouse wheel, high Performance, Ownerdrawn, Stylish, Multi-line selection, Custom list-icons, Item Highlighting, Unicode support, Adjustable RowHeight, List Sorting, Grid lines and nice Gradient effects. Try it and feel free to comment... HAVE A NICE TIME!!! Jim Jose :)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 43 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

2/10/2006 9:48:09 PMHeriberto Mantilla Santamaria

Only one word: thx.
(If this comment was disrespectful, please report it.)

 
2/10/2006 10:01:38 PMOption Explicit

Well Jim, you beat me to it again! This looks simply great. I was wondering when this was coming. Looking forward to fully testing it, thanks a million.
(If this comment was disrespectful, please report it.)

 
2/10/2006 11:21:02 PMRuturaj

Wow! This is getting better and better! Can't wait to download ... I will come back once I download and run it on my XP Pro system! Thanks for sharing your code with us though!
(If this comment was disrespectful, please report it.)

 
2/11/2006 2:11:18 AMSelemaco

Hi Jim, very good idea and result..
I have only one problem ; when i set thelist in mode 5(FileBrowser) the list not expand and not show the content of my USB keys. On main list, my USB key is the last drive (j:). Can you help me to resolve it ? Thank you.
(If this comment was disrespectful, please report it.)

 
2/11/2006 2:48:59 AMSelemaco

UPDATE :
Dear Jim, i have checked and i discovery that then list in mode 5-Mode_FileBrowser, never show the content of last drive in list.
Bye.
(If this comment was disrespectful, please report it.)

 
2/11/2006 8:03:50 AMJim Jose

Heriberti, Matt, Ruturaj.... thanks for those for nice comments. Test the code and inform me if u find anything wrong.

Selemaco, yeah I noticed that. The last drive is a CD drive for me and it's true that I never tried it. Anyway the problem is fixed and will be corrected in the next update. If you need it before that, please hit a mail to me.
(If this comment was disrespectful, please report it.)

 
2/11/2006 10:30:18 AMTerriTop

Excellent Update! This is the sort of high end programming that we all can learn from...Thanks again for sharing. TerriTop
(If this comment was disrespectful, please report it.)

 
2/11/2006 5:02:02 PMSteppenwolfe

Listview in project CodeId=52186 uses different methods, but might be good for styling ideas.. good job, my 5
(If this comment was disrespectful, please report it.)

 
2/11/2006 7:35:06 PMKinex

This is really great. Just like your toolbar .. a masterpiece. It's very well written, easy to use and looks amazing! Only thing I noticed was when changing border styles I sometimes got a wired result when switching dynamically between 3D and 2D but thats maybe a Windows fault. Keep it up :)
(If this comment was disrespectful, please report it.)

 
2/11/2006 10:37:02 PMList

Also crash when put the control into a picturebox or a frame, try click any item.
(If this comment was disrespectful, please report it.)

 
2/12/2006 1:38:27 AMJim Jose

List........ NO!!! it never happens for me with the copy I have.

Anybody else notice this issue with the released version???
(If this comment was disrespectful, please report it.)

 
2/13/2006 4:28:33 AMJim Jose


Ok, the horizontal scrollbar is now introdused. Lets have a look !!

(If this comment was disrespectful, please report it.)

 
2/13/2006 4:46:21 AMDriss HANIB

very good job.
but when used in a lan, it doesn't find the name of a shared folder ; it writes 'data'.

(If this comment was disrespectful, please report it.)

 
2/13/2006 6:56:29 AMList

The bug also exist in the new version.
This bug have been exist in this control all version except of ver 1.x[x<9].
(If this comment was disrespectful, please report it.)

 
2/13/2006 2:18:36 PMJim Jose


Hanib, thats may be due to the file filter flags. I don't have LAN and I need ur help !!

List, Is that an IDE crash?? (It's may be due to some subclassing problem, I need your email to send a test version)

(If this comment was disrespectful, please report it.)

 
2/13/2006 2:26:17 PMdreamvb

Wow this is cool. And the best control I ever seen on pscode. Nice work Damm this even puts all the MS Controls to shame. Keep it up 5 form me *****
(If this comment was disrespectful, please report it.)

 
2/13/2006 2:30:05 PMRiccardo Cohen

Some bugs:
1. Row heights of items are not equal.
2. In Mode_FileBrowser; when a couple directories are expanded, scroll up with mouse wheel and you can see that the first item is unvisible. Click ListBox and it appears again.
3. When a directory is expanded, the lines in front of the last directory passes through the last item.
4. Suggestion: can you add property 'ScrollLines' for scrolling items when mouse wheel is used? Now mouse wheel scrolls one by one.
5. Suggestion: Can you add (+/-)button in front of the Directory Icon if directory contains other sub-directories?

This code rocks! 5 globes from me! ;-)
Keep up the good work!
(If this comment was disrespectful, please report it.)

 
2/13/2006 2:46:01 PMRiccardo Cohen

Bug report: ListBox doesn't know the difference between a CD or DVD. Volume label shows CD-ROM i.s.o. DVD Drive.
(If this comment was disrespectful, please report it.)

 
2/13/2006 3:57:09 PMJim Jose

dreamvb, nice to hear those!!! :)

Riccardo Cohen, WOW suggessions... I LOVE THAT!!

1) RowHeight is automatically adjusted to suit the control height....
2) I could reproduce the bug!!! Will be fixed in the next version
3) Sorry, I don't understand!! Pls tell more about it!!
4) Ok !!
5) I wish I could!!
6) I know that issue... but I don't know the mecthod to solve it. Suggest one if u can.

(If this comment was disrespectful, please report it.)

 
2/14/2006 1:53:44 AMJim Jose

Riccardo, Can you tell me which flag the "GetDriveType" API returns for your DVD drive...
(If this comment was disrespectful, please report it.)

 
2/14/2006 7:48:48 AMHeriberto Mantilla Santamaria

One question: Why the Horizontal Scrollbar doesn't changed flat style.

One suggestion: When changed the size icon adjust the size of rectangle and move a little the text, when style is "treeview".

Anyway fantastic work.
(If this comment was disrespectful, please report it.)

 
2/14/2006 8:51:30 AMJim Jose

Heriberto,

1) Sorry I missed the flat concept when introduced the horizontal scrollbar

2) The size of icon is actually the ICON SIZE that is extracted from the file. The rectangle size is set equal to rowheight...

Soon the version 3.4 will be released which have +/- buttons (like tree view) and I will correct the bug u found.... Thanks for reporting :)

(If this comment was disrespectful, please report it.)

 
2/14/2006 10:10:48 AMFrédéric Côté

found a small bug, one of my directories has a & in its name, but your control on the test form didn't show it, instead the following letter was underlined as in a menu item
(If this comment was disrespectful, please report it.)

 
2/14/2006 1:00:53 PMOption Explicit

Jim I might be able to help with Frederic's problem. If you are using DrawText API to display text, maybe using the DT_NOPREFIX parameter (&H800) will help that. Not sure but I think that's how I handled things in one of my projects...
(If this comment was disrespectful, please report it.)

 
2/14/2006 11:42:56 PMJim Jose

Heriberto, I can't figure it out whats the problem with horizontal scrollbars. The Flatness is applied for the hwnd and not for a type of scrollbar. But, both was drawn differently. I think I have to contact my scrollbar master (Gary) to solve this issue.

Federic, thanks for informing the bug, Will be corrected soon.

Thanks matt for sharing ur knowledge... I will go through that...

(If this comment was disrespectful, please report it.)

 
2/15/2006 4:24:45 AMJim Jose

Ooops, I can't upload the new version !!! Some SQL error is generating during uploading...
(If this comment was disrespectful, please report it.)

 
2/15/2006 8:41:21 AMBasak Karpuz

Nice.
(If this comment was disrespectful, please report it.)

 
2/15/2006 11:33:37 AMHeriberto Mantilla Santamaria

No problem Jim, PSC take problems in this moment when you reupload the projects.

PSC delete two of my post for this method.
(If this comment was disrespectful, please report it.)

 
2/15/2006 5:46:54 PMJim Jones

Excellent control. 5 stars. Works very well on my XP SP2 system.

One question, does it support multi-line captions?
(If this comment was disrespectful, please report it.)

 
2/15/2006 11:28:30 PMPhilip Zac

Dear JIm, I love the control, can u pls subclassed listview to have the custom selcolor on the selected item instead of the dark blue.
(If this comment was disrespectful, please report it.)

 
2/17/2006 6:26:29 AMRiccardo Cohen

Can't wait for the upgrade! :-)

Riccardo
(If this comment was disrespectful, please report it.)

 
2/17/2006 8:35:37 AMJim Jose

I tried it 6 times now!! All I am getting is an unknown SQL error on line 709 :) I am going to try once more....
(If this comment was disrespectful, please report it.)

 
2/17/2006 8:51:20 AMJim Jose

Ooops, It happened again... (I don't know its only for me??)

---------------
"Microsoft OLE DB Provider for SQL Server error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/vb/Authors/Submit/SubmitAction.asp, line 709
---------------

I contacted Ian (founder of PSC) about this. But there was no reply... (may be he is too busy these days)

(If this comment was disrespectful, please report it.)

 
2/18/2006 3:59:11 PMJim Jose

I can't upload the new version to PSC (getting the same error i mentioned). So I uploaded it to my FTP. If you wish, you could download the latest version (3.6) from....

ZIP Fle :
www.globeltech.1l.com/downloads/McListBox.zip

SCREEN SHOT :
www.globeltech.1l.com/downloads/McList.JPG


(If this comment was disrespectful, please report it.)

 
2/20/2006 3:21:41 PMHeriberto Mantilla Santamaria

Yeah of course, thx the link.
(If this comment was disrespectful, please report it.)

 
2/22/2006 8:26:14 AMRichard Mewett

Jim, looks like a lot of work has been done on this since the original! As usual it looks great *****
(If this comment was disrespectful, please report it.)

 
2/22/2006 2:12:27 PMJim Jose

Thanks Richard, all the upgrading works was started from your scanpath example... and yeah there is many more (modes) to come :))

NB: FTP updated with a new zip file, which is with the modifications made by gary to solve HScrollbar issue!!

Full credits goes to Gary. Thanks Gary!!

(If this comment was disrespectful, please report it.)

 
2/25/2006 3:22:05 AMRiccardo Cohen

Bug report. Try this in runtime mode: Choose Border = 0 then choose border = Sunken. This doesn't draw a sunken border anymore!
(If this comment was disrespectful, please report it.)

 
2/25/2006 5:12:50 AMRiccardo Cohen

(1) DVD-recognition still doesn't work.
(2) (+/-) button doesn't work correctly. Showing (+)-button in front of directory even directory is empty.
(If this comment was disrespectful, please report it.)

 
2/27/2006 1:08:16 PMRiccardo Cohen

(1) Item Completer shows at wrong position in this version...
Suggestion: You can fully design an explorer by using only this control. Only need a Mode 'FolderFileList'.

Regards,
Riccardo
(If this comment was disrespectful, please report it.)

 
3/4/2006 7:45:12 AMSikLife

I think your site isn't working eaither... I couldn't view the ss..
(If this comment was disrespectful, please report it.)

 
3/8/2006 8:42:50 AMpietro ing. cecchi

hi SikLife,
to access the download in Jiim's site just use this url:
http://www.globeltech.1l.com/downloads/

bye :)
(If this comment was disrespectful, please report it.)

 
3/16/2006 3:07:36 PMOption Explicit

Jim, where's your chicken? I could watch it lay eggs for hours ;) Congrats on COTM by the way.
(If this comment was disrespectful, please report it.)

 
3/20/2006 1:36:02 AMtonyn

As impressive as this control first appears, its acutally pretty useless because you can't set the path and have it go to the position in the tree when you are browsing folders or files! so the user has to click click clik all the time to get to where he wants??? no good - in my view this control is not finished yet.
(If this comment was disrespectful, please report it.)

 
3/20/2006 7:02:55 AMJim Jose

I know it is not finished!! But, currently I am working on some other language and not have enough time to work on it... Use it if u r interested !!! LEAVE IT is you don't want !!
(If this comment was disrespectful, please report it.)

 
3/28/2006 7:10:48 PMmagik

i get an error when tryin to add the ImageList to a form
(If this comment was disrespectful, please report it.)

 
4/11/2006 11:02:25 PMJim Jones

Excellent control. One of PSC's best.

One feature that is not implemented in this control, which does exist for the standard MS Listbox control is the ItemData property. It allows the storing of an ID along with the List data. How would I go about extending this feature into your control? Or is this something you may add in a future release?

Thanks and keep up the great work.

(If this comment was disrespectful, please report it.)

 
8/16/2006 7:38:48 AMTuanHai

Hi Jim Jose,
Any other improvement? Pls show where to update.
(If this comment was disrespectful, please report it.)

 
9/6/2006 1:17:37 PMJoaquin Marcher

you are teh best in this job!!1 u must know!
(If this comment was disrespectful, please report it.)

 
9/12/2006 10:53:22 PMRoberto Asyn

Pls show where to update. Buenisimo!
(If this comment was disrespectful, please report it.)

 
12/5/2006 9:47:04 AMOverunity

This is an excellent control. Where can we get the updated version with the improvements since V3.3? It seems like the url http://www.globeltech.1l.com/downloads/
isn't working anymore.
(If this comment was disrespectful, please report it.)

 
1/24/2007 2:20:28 PMaolingo

didn't support utf-16 ...
(If this comment was disrespectful, please report it.)

 
2/23/2010 7:52:19 AMraaz

Best job. I think there should be a hover selection on mouse move and mouse icon should be change.
(If this comment was disrespectful, please report it.)

 
3/4/2011 7:55:10 PMKen

I can't get the updated version, have not checked yet, but was it ever uploaded to PSC? Thats what I'll do right now though.
(If this comment was disrespectful, please report it.)

 
11/5/2011 8:37:22 PMIDONTNODOU

Do you have a 'latest version' link for the MCListControl? I appreciate your time in advance.....
(If this comment was disrespectful, please report it.)

 
11/28/2011 9:50:12 AMUFO

It doesn't work on win7
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.