This project is intended to replace the MS common controls for VB6.
The "MSCOMCTL.OCX" (respectively "COMCTL32.OCX") can be replaced completly.
The "MSCOMCT2.OCX" (respectively "COMCT232.OCX") can be replaced completly.
The "RICHTX32.OCX" can be replaced completly.
The "COMDLG32.OCX" can be replaced completly.
The "COMCT332.OCX" can be replaced completly.
The "MCIWNDX.OCX" (shipped with VB5) can be replaced completly.
The "SYSINFO.OCX" can be replaced completly.
Following controls are available at the moment:
- Animation
- CheckBoxW
- ComboBoxW
- CommandButtonW
- CommandLink
- CoolBar
- CommonDialog (Class Module)
- DTPicker
- FrameW
- HotKey
- ImageCombo
- ImageList
- IPAddress
- LabelW
- LinkLabel
- ListBoxW
- ListView
- MCIWnd
- MonthView
- OptionButtonW
- Pager
- ProgressBar
- RichTextBox
- Slider
- SpinBox
- StatusBar
- SysInfo
- TabStrip
- TextBoxW
- ToolBar
- TreeView
- UpDown
Unicode is supported for all the stated controls.
At design time (IDE) there is only one dependency. (OLEGuids.tlb)
This is a modified version of the original .tlb from the vbaccelerator website.
But for the compiled .exe there are
no dependencies, because the .tlb gets then compiled into the executable.
Everything should be self explained, because all functions and properties have a description.
This Demo shows of how to make the ToolBar control accessible per shortcut key on a MDIForm.
ActiveX Control versions, together with a Registration-Free (Side-by-side) solution:
Version 1.0 (End of support)
Version 1.1
Version 1.2
Notes:
- When using the SetParent API, then you should pass .hWndUserControl and
not .hWnd to it.
- When changing the "Project Name", then you should have all forms open, else all properties are lost. Reason is due to the fact that the library to which the controls are referring is the "Project Name" itself. Keeping all forms open will ensure that the .frx files will be updated with the new "Project Name".
- In order to trap error raises via "On Error Goto ..." or "On Error Resume Next" it is necessary to have "Break on Unhandled Errors" selected instead of "Break in Class Module" on Tools -> Options... -> General -> Error Trapping.
- If you want to embed the controls into another UserControl then you need to add the
following code (Post #597) into your UserControl. As else the accelerator keys like the Left/Right key will not work. This issue is only relevant when using the Std-EXE Version. (The OCX Version will just work fine without any additional code)
List of revisions:
Code:
04-Jun-2016
- Included the Level property of a Node in the TreeView control.
02-Jun-2016
- Included the ItemFromPos property in 'CbrBands' in the CoolBar control.
01-Jun-2016
- Bugfix in the Key (String) handling for the ListSubItems method 'Add', 'Item' and 'Remove' in the ListView control.
31-May-2016
- Noticeable less memory consumption in Report View in the ListView control.
Also the Tag property in 'LvwListSubItem' is now as Variant.
- Some other minor internal improvements.
30-May-2016
- Fixed a bug when adding a ListSubItem in-between in the ListView control.
29-May-2016
- Tag property in class collections are now as Variant. (except for 'LvwListSubItem', which remains as String)
At design-time only String variables can be set, like in the original MS control.
It is not allowed to store circular reference objects. (error will be raised)
Example: 'Set TreeView1.Nodes(1).Tag = TreeView1.Object' (Though TreeView1 without '.Object' is allowed)
28-May-2016
- Shadow objects in class collections are now also decoupled in run-time controls. (ImageCombo, LinkLabel, ListView and TreeView control)
This ensures that UserControl_Terminate will always be fired.
They were already decoupled in design-time controls. (TabStrip, StatusBar, ToolBar, CoolBar and ImageList control)
26-May-2016
- Included the ItemFromPos property in 'LvwColumnHeaders' in the ListView control. (via HDM_ORDERTOINDEX)
25-May-2016
- Included the NodeBeforeCheck event in the TreeView control.
23-May-2016
- Minor bugfixes in the TopItem property in the ListView control.
22-May-2016
- Improved the TopItem property in the ListView control.
It can be used now also when groups are enabled in 'report' view. (LVM_GETTOPINDEX fails in this case, thus a workaround was necessary)
Enhanced the code when in 'Icon', 'SmallIcon' and 'Tile' view.
21-May-2016
- Included the NodeBeforeSelect event in the TreeView control.
- Removed the GetFirstVisible function in the TreeView, ListView and ImageCombo control.
It has been replaced by the TopItem property. It can be even 'Set' in the TreeView and ImageCombo control.
- The NodeCheck event is now also fired when the checked state of a node was changed by code in the TreeView control.
- The ItemCheck event is now also fired when the checked state of an item was changed by code in the ListBoxW control.
- The ColumnCheck event is now also fired when the checked state of a column header was changed by code in the ListView control.
19-May-2016
- The DragIcon, DragMode and ToolTipText property are now also available when setting to a shadow object. ('Set' command)
- The Drag and SetFocus method are now also available when setting to a shadow object. ('Set' command)
17-May-2016
- Included the class 'RtfOleCallback' in the RichTextBox control.
This decouples the IRichEditOleCallback interface and ensures UserControl_Terminate will always be fired.
When updating, please replace all components. (e.g. RichTextBoxBase.bas)
16-May-2016
- Improved the Expanded property of a Node in the TreeView control. It works now like in the original MS control.
It is now ensured that BeforeCollapse/BeforeExpand and Collapse/Expand events are always fired when state is being changed.
Also it is now possible to set the expanded state even when there are no child items associated.
- To support large numbers the Children property of a Node returns now 'Long' instead of 'Integer' in the TreeView control.
15-May-2016
- It is now possible to pass a Node object in the Relative parameter in Nodes.Add and Node.Move in the TreeView control.
- Removed the error message 'the size of the selected picture is not compatible' in the Images property page of the ImageList control.
So at design time it is now allowed to select different sized pictures. At run time it was already allowed.
The original MS control allows it also. So such error message was a unnecessary limitation.
12-May-2016
- Fixed a bug in the Move method of a Node and some other internal improvements in the TreeView control.
Bugs were in relation to the new ExpandedImage property of a Node.
11-May-2016
- Included the ExpandedImage property of a Node in the TreeView control.
08-May-2016
- The SelChange event is now also fired when value or selection was changed by code in the MonthView control.
- Some internal improvements in the DTPicker and MonthView control.
06-May-2016
- Fixed a bug that the DateClicked parameter in the DateClick event was invalid in the MonthView control.
- Included Error 35770 "An invalid date range was specified" in the MonthView control.
05-May-2016
- Fixed a bug that the Change event was not fired when the checkbox state changed in the DTPicker control.
- Included Error 35787 "Can't set Value to Null when CheckBox property is False" in the DTPicker control.
This Error is also raised in the original MS control.
04-May-2016
- The Change event is now also fired when value was changed by code in the DTPicker control.
Though in the original MS control it is only raised when value was changed by user.
But that makes actually no sense and might be even a bug in the original MS control.
15-Apr-2016
- Minor adjustment to the BackColor in the StatusBar control so that the Pager control can recognize it.
31-Mar-2016
- Minor bugfix in the internal Numeric/Currency/Date sorting functions in the ListView control.
09-Mar-2016
- Improved the calculation that determines if DPIs are different. All controls are now really "DPI Aware".
01-Mar-2016
- Bugfixes and improvements for vertical ToolBar control. (Align property set to vbAlignLeft or vbAlignRight)
The Vertical ToolBar behaves now like the original MS control when the Wrappable property is set to False.
Also changing from horizontal to vertical and vice versa after initialization works now properly.
29-Feb-2016
- All controls are now "DPI Aware". (concerns exotic DPI or very large DPI, e.g. 113% and 200%)
- ComboBoxW with Style 'CboStyleDropDownCombo' is now working on Windows 2000.
Message CB_GETCOMBOBOXINFO is not supported on Windows 2000, so little workaround was necessary to solve this.
- Some other minor internal improvements.
25-Feb-2016
- Minor adjustment to the BackColor in the ToolBar control so that the Pager control can recognize it.
24-Feb-2016
- Fixed a bug that the Scroll event fired twice instead of once in the Slider control.
19-Feb-2016
- The BackColor property in the ToolBar control is now shown/visible at design-time.
But it remains ignored when the control paints via double-buffering. (also at run-time)
30-Jan-2016
- Included the ShowTrailingDates property in the MonthView control.
- Included the CalendarShowTrailingDates property in the DTPicker control.
- Forgot to rename the HotTrack property to 'HotTracking' in the property page of the SpinBox control.
28-Jan-2016
- Fixed a bug in the LVN_ITEMACTIVATE handler in the ListView control.
The Shift parameter in the ItemActivate event was not properly set.
19-Jan-2016
- Renamed the HotTrack property to 'HotTracking' in the SpinBox control.
So the wording is in line with the UpDown, TreeView, TabStrip, ListView and LinkLabel control.
07-Jan-2016
- Included the MaxText event in the TextBoxW and RichTextBox control.
01-Jan-2016
- Mouse events now again in correct order in the ImageCombo, TreeView and ListView control.
Some workaround was necessary to raise them 'After' (refer to update 21-Nov-2015) and keep correct order.
Issue was an internal modal message loop on these controls. (DragDetect)
29-Dec-2015
- UserControl_Resizer is now called in the CoolBar control when setting a child control.
08-Dec-2015
- WM_MOUSEWHEEL handlers are now "processed" (no forward to the chain anymore) in the DTPicker and MonthView Control.
02-Dec-2015
- Fixed a bug in the mouse events in the ListView and TreeView control. (relates to update on 21-Nov-2015)
23-Nov-2015
- Forgot to include ListBoxW and ComboBoxW in the ComCtlsIDEStopProtectionHandler.
- InitReleaseVisualStyles function in VisualStyles.bas is now only called outside IDE.
This is more efficient then always call InitReleaseVisualStyles and do the IDE check on ReleaseVisualStyles.
21-Nov-2015
- Mouse events (e.g. MouseDown) are now raised 'After' the window procedures. (like MS controls do)
When using the GetCapture() API in the mouse events the return values are now appropriate.
Also calling for instance a MsgBox in the mouse events does not mess up the mouse capture anymore.
All other events (e.g. KeyDown) remains 'Before', as the values can be altered. (like MS controls do)
20-Nov-2015
- Included the TabScrollWheel property in the TabStrip control.
16-Nov-2015
- Included the constant 'CdlPDUseDevModeCopies' in the CommonDialog class.
15-Nov-2015
- Less memory consumption in Report View in the ListView control.
13-Nov-2015
- Control arrays are now working properly on all controls.
Shadow objects in class collections are now decoupled in design-time controls. (TabStrip, StatusBar, ToolBar, CoolBar and ImageList control)
10-Nov-2015
- Improved the InitReleaseVisualStyles function in VisualStyles.bas.
30-Oct-2015
- Some minor internal improvements.
29-Oct-2015
- Fixed a bug in the Font property in the LinkLabel control.
- Setting 'Nothing' to the Font properties does not raise an error anymore.
Instead in that case the Font will be set to the 'Ambient.Font'. (like MS controls do)
[...]
11-Nov-2012
- First release.
The attached file is a .
rar file with a .zip extension so it could be uploaded.
This is necessary as for a zip file there is a file limit of 500 KB.