Content
-------
1. Introduction
2. Installation (IMPORTANT!)
3. Adding it to your project
4. New features compared to the native ListBox
5. Credits


Introduction
------------

I needed  a Unicode ListBox with capability to check items. I decided to do this by subclassing the native VB ListBox so I wouldn't need to redevelop much of the default ListBox behavior. The strings are saved as UTF-8 into the control itself.

The control in itself is very basic: you can add more functionality rather easily, ie. adding icons is only a matter of adding the required variables and properties and editing the PaintListItem procedure.


Installation
------------

You must register the WinSubHook.tlb to enable subclassing possibilities.
You can do this in two ways:

1. Manually
Start > Run > cmd > move to the tlb path > regsvr32 WinSubHook.tlb

2. Using VB project
See WinSubHook > Type Lib > RegTlb.vbp


Adding it to your project
----------------------

1. open your project
2. go to menu Project > References
3. you should find Window/Subclass/Hook/Timer interface 1.5 from the list; enable it
4. add cSubClass.cls to your project
5. add UniListBox.ctl to your project

Nothing more is required! You don't need to distribute any extra files, the control is compiled to your program, including the TLB!


New features compared to the native ListBox
-------------------------------------------
- Unicode support
- Highlight coloring support
- Column support (and AutoColumn to let the ListBox set column automatically)
- Border can be turned on/off
- ShowFocus property
- UpdateMode: the control is not drawn when set True

Note: the control doesn't support Sort, MultiSelect or IntegralHeight.
Note: Style can be changed in runtime!


Credits
-------
I wish to thank Paul Caton by solving the IDE subclass crashing issue and of providing WinSubHook tool. Also thanks to people at VBForums of all the small code samples I could find.