-
3 Attachment(s)
[VB6] ActiveX CommonControls (Replacement of the MS common controls)
This is the ActiveX Control version that comes out of the Std-EXE version.
Current version: 1.8.117
The development state of the ActiveX Control version does not necessarily match to the Std-EXE version.
That comes because the Std-EXE version is the "leading source" and the ActiveX Control version is derived from the Std-EXE version after a certain time.
Reason why is that it is not practicable to release a new ActiveX Control after each new feature.
However, certain bugfixes can and will be implemented into the current ActiveX Control version. (Revision)
It is not recommended to use the source code to compile another binary.
If own modification is necessary please rename the library to avoid redundancies.
The source code of the project can also be viewed on GitHub.
Advantageous compared to the Std-EXE version is that all property pages support Unicode.
All controls are marked as "Safe for Initialization and Scripting" by the IObjectSafety interface.
In order to mark the CommonDialog class also "Safe" it is necessary to run the following .reg file:
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{C8359683-55BA-4AAC-9927-88C9C7A8DD3C}\Implemented Categories]
[HKEY_CLASSES_ROOT\CLSID\{C8359683-55BA-4AAC-9927-88C9C7A8DD3C}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}]
[HKEY_CLASSES_ROOT\CLSID\{C8359683-55BA-4AAC-9927-88C9C7A8DD3C}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]
Also everything is 100% IDE-Safe.
Here is a solution to use the VBCCR18.OCX Registration-Free. (Side-by-side)
Keep in mind that this technology needs at minimum Windows XP SP2 or Windows Server 2003.
Tutorial:
The "Development" machine needs to register the VBCCR18.OCX as usual and use the components for e.g. in a Std-EXE project.
The source project needs to include the Side-by-side resources. (see below)
Then on the "End user" machine you only need the VBCCR18.OCX and the .exe (Std-EXE project) on the same folder.
It will work then without any registration.
The source code of "VBCCR18SideBySide.res" is:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<file name="VBCCR18.OCX">
<typelib tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" version="1.3" flags="control,hasdiskimage" helpdir="" />
<comClass clsid="{C8359683-55BA-4AAC-9927-88C9C7A8DD3C}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.CommonDialog" />
<comClass clsid="{EC8A7603-EB8C-4173-9C42-4972A793A86C}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.Animation" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{E4E59B8B-D20D-4656-9228-226EF3CA0CB0}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{B2CC04FF-5090-4C02-B510-9716E88BDCD9}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.CheckBoxW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{19147FFA-158B-4DA9-B031-FA75DD0AF890}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ComboBoxW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{9667B0DB-2C76-4F27-97BF-11156BBA4E11}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.CommandButtonW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikebutton,setclientsitefirst" />
<comClass clsid="{5EAF07AB-7A56-4149-A497-82E035D7090B}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.CommandLink" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikebutton,setclientsitefirst" />
<comClass clsid="{834C6E68-AF2C-4053-89D2-E3FCCED69287}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{DF4944EF-764A-4D93-B4DA-0D6749338EF6}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.CoolBar" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,simpleframe,setclientsitefirst" />
<comClass clsid="{5FC44145-D7D8-4EAB-8CA7-60B87F381065}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{4B3C58FC-7112-4B08-B3B1-470B2DCFFA2F}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{FEB00E45-C4A0-4DFB-8454-C4987A2DBE06}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.DTPicker" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{B8D33C5F-A8D8-469A-B00C-D27F7B2EE487}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{B83DDC0B-CAC7-47B2-9627-4EC164A31700}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.FontCombo" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{095CCEEA-03B6-44E9-8E7B-AFFEB72F6A60}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.FrameW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,nouiactivate,simpleframe,setclientsitefirst" />
<comClass clsid="{DEC225A1-68EB-4CBB-91C0-4FD4D0913949}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.HotKey" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{589AF2C5-643E-40C4-85F3-2C67D24A9571}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ImageCombo" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{2CC64D4B-DC8F-4495-AD42-580AC5690376}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{3B393273-5E3E-4506-A3F0-3173B140F466}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ImageList" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,nouiactivate,setclientsitefirst" />
<comClass clsid="{A40E9C6B-E357-4781-A59C-2CA5D7930B70}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{63788658-57FC-457C-ABB0-87EC36842315}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{0CDC9FE2-8D27-4D68-80E7-0FF7CDC0F6F6}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.IPAddress" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{D984BD17-30BA-4E0B-AB85-7491DF73CB4F}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{5D105D48-B608-4B50-AE86-CF1947379F57}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.LabelW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,nouiactivate,setclientsitefirst" />
<comClass clsid="{D6D1A4D2-61DD-433D-BCD8-650A5537F95D}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.LinkLabel" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{A70DB71A-AC70-4F8F-A1D6-68E3F1F24CF5}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{9874AC62-910D-4566-BC10-5DF3F02CE204}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ListBoxW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{B1E75914-8CB4-4800-A71B-A43310D6B4E2}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ListView" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{AB0C5F37-A56C-4C79-9962-321B616D943A}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{9D107ACC-E9C7-4D8D-BED5-AAB9F6ED1590}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{AA7E6F94-FE56-4F61-9609-E48E186FB28E}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{9C8AFD17-3999-4C84-B4F7-8D90FB4033A5}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.MCIWnd" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{E284466E-6750-4DF7-AEFE-16183FDC6C6F}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.MonthView" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{30342EC9-6AA6-4A44-B90D-3CE73A5CEAEC}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{0E682A9B-93A5-4F4C-A2C6-169D2AD10641}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.OptionButtonW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{6662F4B4-E0F0-4D60-9A6A-5E9B208B3392}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.Pager" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,setclientsitefirst" />
<comClass clsid="{5DB956BE-A012-4C4F-AF80-5F9F778CE3A8}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{A886CB1C-F3C9-4915-BF0E-E19A2291796E}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ProgressBar" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,setclientsitefirst" />
<comClass clsid="{8BBE0224-1DE7-45D4-BA29-B86C71D33264}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{EEF33BF2-B9B9-4385-A703-D511BEFAEC81}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.RichTextBox" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{3FA4D46D-883B-4F6A-B569-65DBE6535FF0}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{73BBF696-6D19-46BA-9EC7-BE2B5921D43F}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.Slider" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{E5A1AEC3-5509-42EC-8C1F-40BCBB5D5C3C}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{476BDCA6-91E1-44A8-8393-A95C2052532D}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{FE369216-6FB1-456A-A049-4A8D8E076DDC}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.SpinBox" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{60DC56A6-2949-4D6D-966D-842F9B396947}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{ED0D12DC-8D47-4B13-8B54-C4E26E771E30}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.StatusBar" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,setclientsitefirst" />
<comClass clsid="{DC2A4C26-4A02-4BE7-911E-0EF40147E18E}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{8DDC9945-3E89-4000-B35F-A87B36F21BF0}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{1217ADD4-05E7-4949-AA9B-3961442A1330}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.SysInfo" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,nouiactivate,setclientsitefirst" />
<comClass clsid="{7FF38013-0606-4268-AD3B-970D2CEE4431}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.TabStrip" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{41D7D7A5-882F-4CE8-865E-1071BB63FEF1}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{51192D9B-177C-4737-AC63-0E2DADAA1B0B}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{5783BC5F-C3FE-4982-B10E-D68C9DBC2B93}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.TextBoxW" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{CCFE7049-5B76-4C89-B2F5-B841E63D7B81}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{FCCADBB2-F12F-442D-9E48-00A55D2E39B2}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.ToolBar" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,simpleframe,setclientsitefirst" />
<comClass clsid="{F6511082-8B4F-4246-BEC2-5E492989E7B2}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{4849FCF6-C182-45DD-8986-5D8A4593C8DB}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{35EF5609-4AE7-40C1-8196-F1ACE9213E2E}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.TreeView" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,alignable,setclientsitefirst" />
<comClass clsid="{FBF38358-FBEC-4D38-AFBA-2D5A4CDD3B3C}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{7B4B942C-C0A8-4F16-9AE2-365EFE4D8526}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.UpDown" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,setclientsitefirst" />
<comClass clsid="{24EED684-815B-4A9F-AAC9-E0D8F1C75BBB}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" />
<comClass clsid="{EEE1C302-99F4-4ABC-B180-1C41533722B0}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.VirtualCombo" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{D88CC683-6B92-4FEE-8DD0-A9212D5B7D37}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.VListBox" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{49D77466-C1F3-436A-A0CA-7B5B6C462FC5}" tlbid="{379157C5-E9BD-43F1-9F83-B037496BED42}" threadingModel="Apartment" progid="VBCCR18.WindowedLabel" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,nouiactivate,setclientsitefirst" />
</file>
</assembly>
The attached file VBCCR18.OCX.rar.zip should be renamed to VBCCR18.OCX.rar after download and it contains the pre-compiled OCX.
The attached file VBCCR18.zip contains the source code.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hey guys - thanks for the great work. I'm having a problem though. First off the demo app crashes VB6 when I load the main form.
I made a new form and added controls to it one by one. I ran into a snag when I added the Link Label control. I get "The Linklabel control requires at least version 6.0 of comctl32.dll. in order to use it, you have to define a manifest file for your application. For using the control in the VB6 IDE, define a manifest file for VB6".
The command Link control says almost exactly the same thing except it says i need version 6.1 of comctl32.dll
Any idea where a guy can get comctl32? Any idea where I could get a manifest file for VB6 (or what that means?)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
Hey guys - thanks for the great work. I'm having a problem though. First off the demo app crashes VB6 when I load the main form.
I made a new form and added controls to it one by one. I ran into a snag when I added the Link Label control. I get "The Linklabel control requires at least version 6.0 of comctl32.dll. in order to use it, you have to define a manifest file for your application. For using the control in the VB6 IDE, define a manifest file for VB6".
The command Link control says almost exactly the same thing except it says i need version 6.1 of comctl32.dll
Any idea where a guy can get comctl32? Any idea where I could get a manifest file for VB6 (or what that means?)
The comctl32 is already there. A manifest file just says which version you want to use.
Follow the instructions here to enable the IDE for using the 6.x comctl32. And add the VBCCR14SideBySideAndVisualStyles.res to your app to enable your compiled .exe to use the 6.x comctl32.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Thanks for the reply. I did follow the instructions and made a new VB6.EXE file. Added all the indicated resource files - all 3 listed above - and put the new EXE in the proper folder, replaced the existing VB6.EXE, rebooted and re-ran the demo project.
Similar error followed by the IDE crashing.
The error is happening because ComCtlsSupportLevel() returns a zero. The source code responds with an error message saying
"To use this functionality, you must provide a manifest specifying comctl32.dll version 6.0 or higher."
Sad that such an amazing project and the demo just doesn't work at all.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Pretty impressive work! I've managed to use the OCX file. No luck with any of the side by side stuff. I'm just lost in that area. And the demo crashes and locks up VB. So that doesn't exactly instill confidence. But other than that, it's quite the project. Thanks!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Thanks for the project. This is really helpful. But I have a problem when I am trying to use this ActiveX CommonControls with my project to support Unicode. But it works only with developing machine. When I tried to run the project in another computer after registering the VBCCR14.OCX, it gives me a error message "Error in loading DLL". Could you please tell me how do I solve this issue?
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
First and foremost, thanks a ton to Krool for this wonderful effort. This is absolutely marvelous and it is pretty exciting to go through the various aspects of this project (Replacement of the MS common controls). Though I am interested in all the controls, as of now, my primary interest is on the RichTexBox. So, I started experimenting with it and I encountered some problems.
I am listing the problems below along with a code snippet to illustrate the problems. Please note that I am new to this forum and this is the first time I am writing here. So, in case I have not followed any protocols related to posting, kindly bear with me and please do guide me for later posts. Also, in case I have understood things completely wrongly about one or more aspects of either the RichTextBox control of this project or of this project itself and that is the reason for me facing the following problems, then kindly correct my understanding and kindly guide me as to what to do to set right the following problems.
Problems:
1. When I set some string (e.g. "a") for a RichTexBox control (say, named 'rtb1') and then compare the text with the same string (i.e. if rtb1.text = "a"), the comparison does not return true. Also, adding some string to the end of 'rtb1' results in characters not present in the string getting added (and displayed). I found that space in the original string was always getting replaced by a character whose Unicode value was U2000 (Decimal - 8192). Same with other characters, as far as I observed. A specific character (say 'a') was always getting replaced by one other specific character.
2. 'Len' and 'Instr' consider "VbCrLf"s fully whereas 'SelStart' and 'Find' ignore the Lf in "VbCrLf"s. Because of this, inconsistencies arise.
The code below illustrates what happens because of the above two problems. It needs a Form with a CommandButton (Command1) and a RichTextBox (named 'rtb1')
Code:
Private Sub Command1_Click()
Dim s As String
s = " a " & vbCrLf & vbCrLf & " ab"
rtb1.Text = s
If rtb1.Text = s Then
MsgBox "yes"
End If
MsgBox "Length = " & Len(rtb1.Text) '10 is displayed
rtb1.SelStart = Len(rtb1.Text)
MsgBox "Selstart = " & rtb1.SelStart '8 is displayed
MsgBox "Instr b = " & InStr(rtb1.Text, "b") '10 is displayed
MsgBox "Find b = " & rtb1.Find("b") '7 is displayed
rtb1.Text = rtb1.Text & s 'characters not present in string 's' get added (and displayed)
End Sub
Note-1:
After working on "problem 1" for around 6 hours - to find its cause and a possible solution, I finally set right the problem at my end by introducing a line of code in the following function of 'RichTextBox.ctl'.
Code:
Private Function StreamStringOut(ByRef Value As String, ByVal Flags As Long) As Long.
I added the following line
Code:
value = left$(value, len(value))
after the line
Code:
Value = RtfStreamStringOut()
in the aforesaid 'StreamStringOut' function.
I am not at all suggesting that the inclusion of the above line of code is the right thing to do. I am just mentioning what I did so that it can serve as a tip to Krool or any other member to find out the right thing to be done, eventually.
Note-2:
As of now, I do need VbCrLf in my programs. So, I would be happy if the eventual solution does consider VbCrLf fully so that it is consistent with the behavior of the normal RichTextBox (RICHTX32.OCX component, I mean).
Note-3:
I have tested with the latest version of the ocx control (1.4.11). My system is Windows 7, 64-bit.
A few queries now:
1. The links in the RichTextBox are not clickable. I have to set some property on or off to make them clickable? If so, what is that property? If not, is anything planned for making the links clickable in future?
2. The normal RichTextBox wraps text around even if horizontal scroll bar is set. The RichTextBox of this project wraps text around only when the horizontal scroll bar is not set. Can the RichTextBox of this project also made to wrap text around even if horizontal scroll bar is set?
Thanks.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Should this control work with VBA. I added a reference in Access, but when I try to add a control to a form, Access crashes.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Krool, the updated OCX file did not get attached to post #1...
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hi there Krool,
first of all thank you for your effort in this project. This is indeed a wonderful replacement for the old and buggy MS Common controls.
I use the MS Common Controls in various projects in MS access and I tried adding a reference in Access but it crashed as soon as I added a control. Is there a way to make your controls work in VBA?
Thanks in adavance
BR
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
fixxxer
first of all thank you for your effort in this project. This is indeed a wonderful replacement for the old and buggy MS Common controls.
I use the MS Common Controls in various projects in MS access and I tried adding a reference in Access but it crashed as soon as I added a control. Is there a way to make your controls work in VBA?
VBA was not my top priority. I know that most of the controls don't work and others do. For example ImageList control does work.
However, I will begin testings soon to enable better VBA support.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
fixxxer
Hi there Krool,
I use the MS Common Controls in various projects in MS access and I tried adding a reference in Access but it crashed as soon as I added a control. Is there a way to make your controls work in VBA?
Thanks in adavance
BR
I wonder if you have specified a reference to oleguids.tlb? It shows up in the References list as "OLE Guid and interface definitions" and I don't think it is discussed in this thread but it is included in the zip file (actually it is in the OLEGuids sub-folder of a VBCCR14.zip that is a zip within the larger zip). Every time Krool issues an update, I go to an elevated CMD prompt and I copy that file to C:\Windows\SysWOW64 to ensure that I always have the latest one available for my VB6 and VBA programs and then I go to References in either VB6 or VBA programs and it is always where it should be, whatever the latest version may be.
I just made a new file in Excel 2010 and was able to bring in all of Krool's controls without crashing. He needs to do some work because for almost all of them only a few options show up for each. I don't use Access but my guess is that you need to reference oleguids.tlb.
Krool, you probably should highlight the need to do that in this thread. You do it in the non-OCX thread but I think you need to make a larger reference to its need in this thread.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
For the compiled OCX is no reference needed to OLEGuids.tlb.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Update, the OCX now works better in the VBA environment.
In order to replace to new version of the OCX it is strongly recommended to delete certain cache files for MS Office:
Code:
C:\Users\<username>\AppData\Local\Temp\VBE\VBCCR14.exd
Code:
C:\Users\<username>\Application Data\Microsoft\Forms\VBCCR14.exd
Those cache files do only exist when previously loaded VBCCR14 into the toolbox on a UserForm.
Then replace the new VBCCR14.OCX in the system directory.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Again update so the OCX version works better in the VBA environment.
There might be some pitfalls left (e.g. StatusBar still makes some trouble) but this update does improve the VBA compatibility a big step further.
The cache files should be deleted again when attempting to replace. (see previous post)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hi all and Krool
I have just attempted using it in VBA environment (VBA7 under Excel 2016 32-bit on Windows 10 64-bit)
I can't get some features to work with the ListView, the following has no effect :
Code:
With UserForm1.ListView1
.VisualStyles = True
.VisualTheme = LvwVisualThemeExplorer
.HighlightColumnHeaders = True
.UseColumnChevron = True
End With
Is it normal for now ?
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
hymced
Hi all and Krool
I have just attempted using it in VBA environment (VBA7 under Excel 2016 32-bit on Windows 10 64-bit)
I can't get some features to work with the ListView, the following has no effect :
Code:
With UserForm1.ListView1
.VisualStyles = True
.VisualTheme = LvwVisualThemeExplorer
.HighlightColumnHeaders = True
.UseColumnChevron = True
End With
Is it normal for now ?
VBA IDE is not themed. Thus comctl32.dll version 5.8x is used. So yes, it is normal that your code has no effect.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Update released to version 1.5.
Please note that due to the increased size the .zip archive was no longer sufficient. (> 2 MB)
That's why I had to switch to the .rar archive. As always the .docx extension was added to circumvent the 500 KB upload limit. So remove .docx first.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello,
Here is the update of my converter for the latest version of VBCCRxx (15).
Translates sources using VBCCR 11 to 14 for version 15.
All converted files are saved (.bak) as a precaution.:thumb:
When you have a project of 10000 lines, it's handy!:)
Good work
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
As with the Std-EXE version, installation instructions are missing.
I downloaded and registered the OCX.
Quote:
Keep in mind that this technology needs at minimum Windows XP SP2 or Windows Server 2003
Does the Std-EXE version need minimum Windows XP SP2?
Quote:
The source project needs to include the Side-by-side resources.
Include how? Do I just store this in the source code folder (if so, relative to what?), or do I need to register this somehow (if so, how)?
There is something odd with both of the VBCCR15SideBySide*.res attachments. Your code sample under "The source code of "VBCCR15SideBySide.res" is:" contains only plain text, while the downloaded .res files both have this header:
Code:
00000000 00 00 00 00 20 00 00 00 ff ff 00 00 ff ff 00 00 |.... ...........|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 7f 25 00 00 20 00 00 00 ff ff 18 00 ff ff 01 00 |.%.. ...........|
00000030 00 00 00 00 30 10 09 04 00 00 00 00 00 00 00 00 |....0...........|
00000040 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 |<?xml version="1|
How does one use these new widgets in an existing project?
I tried copying the "VBCCR15" folder into my repo and adding this into my existing VBP file, but there were plenty of errors when I tried to run:
Code:
Class=CbrBand; VBCCR15\Builds\CoolBar\CbrBand.cls
Class=CbrBandProperties; VBCCR15\Builds\CoolBar\CbrBandProperties.cls
Class=CbrBands; VBCCR15\Builds\CoolBar\CbrBands.cls
Class=CommonDialog; VBCCR15\Builds\CommonDialog.cls
Class=Enumeration; VBCCR15\Builds\Enumeration.cls
Class=ISubclass; VBCCR15\Builds\ISubclass.cls
Class=ImcComboItem; VBCCR15\Builds\ImageCombo\ImcComboItem.cls
Class=ImcComboItems; VBCCR15\Builds\ImageCombo\ImcComboItems.cls
Class=ImlListImage; VBCCR15\Builds\ImageList\ImlListImage.cls
Class=ImlListImages; VBCCR15\Builds\ImageList\ImlListImages.cls
Class=LlbLink; VBCCR15\Builds\LinkLabel\LlbLink.cls
Class=LlbLinks; VBCCR15\Builds\LinkLabel\LlbLinks.cls
Class=LvwColumnHeader; VBCCR15\Builds\ListView\LvwColumnHeader.cls
Class=LvwColumnHeaders; VBCCR15\Builds\ListView\LvwColumnHeaders.cls
Class=LvwGroup; VBCCR15\Builds\ListView\LvwGroup.cls
Class=LvwGroups; VBCCR15\Builds\ListView\LvwGroups.cls
Class=LvwListItem; VBCCR15\Builds\ListView\LvwListItem.cls
Class=LvwListItems; VBCCR15\Builds\ListView\LvwListItems.cls
Class=LvwListSubItem; VBCCR15\Builds\ListView\LvwListSubItem.cls
Class=LvwListSubItems; VBCCR15\Builds\ListView\LvwListSubItems.cls
Class=RtfOleCallback; VBCCR15\Builds\RichTextBox\RtfOleCallback.cls
Class=SbrPanel; VBCCR15\Builds\StatusBar\SbrPanel.cls
Class=SbrPanelProperties; VBCCR15\Builds\StatusBar\SbrPanelProperties.cls
Class=SbrPanels; VBCCR15\Builds\StatusBar\SbrPanels.cls
Class=TbrButton; VBCCR15\Builds\ToolBar\TbrButton.cls
Class=TbrButtonMenu; VBCCR15\Builds\ToolBar\TbrButtonMenu.cls
Class=TbrButtonMenus; VBCCR15\Builds\ToolBar\TbrButtonMenus.cls
Class=TbrButtonProperties; VBCCR15\Builds\ToolBar\TbrButtonProperties.cls
Class=TbrButtons; VBCCR15\Builds\ToolBar\TbrButtons.cls
Class=TbsTab; VBCCR15\Builds\TabStrip\TbsTab.cls
Class=TbsTabs; VBCCR15\Builds\TabStrip\TbsTabs.cls
Class=TvwNode; VBCCR15\Builds\TreeView\TvwNode.cls
Class=TvwNodes; VBCCR15\Builds\TreeView\TvwNodes.cls
Class=VTableSubclass; VBCCR15\Builds\VTableSubclass.cls
Module=ComCtlsBase; VBCCR15\Builds\ComCtlsBase.bas
Module=Common; VBCCR15\Common\Common.bas
Module=RichTextBoxBase; VBCCR15\Builds\RichTextBox\RichTextBoxBase.bas
Module=VTableHandle; VBCCR15\Builds\VTableHandle.bas
Module=VisualStyles; VBCCR15\Common\VisualStyles.bas
PropertyPage=VBCCR15\Builds\Animation\PPAnimationGeneral.pag
PropertyPage=VBCCR15\Builds\CommandLink\PPCommandLinkGeneral.pag
PropertyPage=VBCCR15\Builds\CoolBar\PPCoolBarBands.pag
PropertyPage=VBCCR15\Builds\CoolBar\PPCoolBarGeneral.pag
PropertyPage=VBCCR15\Builds\DTPicker\PPDTPickerGeneral.pag
PropertyPage=VBCCR15\Builds\ImageCombo\PPImageComboGeneral.pag
PropertyPage=VBCCR15\Builds\ImageList\PPImageListGeneral.pag
PropertyPage=VBCCR15\Builds\ImageList\PPImageListImages.pag
PropertyPage=VBCCR15\Builds\LinkLabel\PPLinkLabelGeneral.pag
PropertyPage=VBCCR15\Builds\ListView\PPListViewGeneral.pag
PropertyPage=VBCCR15\Builds\ListView\PPListViewImageLists.pag
PropertyPage=VBCCR15\Builds\ListView\PPListViewSorting.pag
PropertyPage=VBCCR15\Builds\MonthView\PPMonthViewGeneral.pag
PropertyPage=VBCCR15\Builds\Pager\PPPagerGeneral.pag
PropertyPage=VBCCR15\Builds\ProgressBar\PPProgressBarGeneral.pag
PropertyPage=VBCCR15\Builds\RichTextBox\PPRichTextBoxGeneral.pag
PropertyPage=VBCCR15\Builds\Slider\PPSliderAppearance.pag
PropertyPage=VBCCR15\Builds\Slider\PPSliderGeneral.pag
PropertyPage=VBCCR15\Builds\SpinBox\PPSpinBoxGeneral.pag
PropertyPage=VBCCR15\Builds\StatusBar\PPStatusBarGeneral.pag
PropertyPage=VBCCR15\Builds\StatusBar\PPStatusBarPanels.pag
PropertyPage=VBCCR15\Builds\TabStrip\PPTabStripGeneral.pag
PropertyPage=VBCCR15\Builds\TabStrip\PPTabStripTabs.pag
PropertyPage=VBCCR15\Builds\TextBoxW\PPTextBoxWText.pag
PropertyPage=VBCCR15\Builds\ToolBar\PPToolBarButtons.pag
PropertyPage=VBCCR15\Builds\ToolBar\PPToolBarGeneral.pag
PropertyPage=VBCCR15\Builds\TreeView\PPTreeViewGeneral.pag
PropertyPage=VBCCR15\Builds\UpDown\PPUpDownGeneral.pag
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation
Reference=*\G{5A2B9220-BF07-11E6-9598-0800200C9A66}#1.0#0#C:\WINDOWS\system32\OLEGuids.tlb#OLE Guid and interface definitions
UserControl=VBCCR15\Builds\Animation\Animation.ctl
UserControl=VBCCR15\Builds\CheckBoxW\CheckBoxW.ctl
UserControl=VBCCR15\Builds\ComboBoxW\ComboBoxW.ctl
UserControl=VBCCR15\Builds\CommandButtonW\CommandButtonW.ctl
UserControl=VBCCR15\Builds\CommandLink\CommandLink.ctl
UserControl=VBCCR15\Builds\CoolBar\CoolBar.ctl
UserControl=VBCCR15\Builds\DTPicker\DTPicker.ctl
UserControl=VBCCR15\Builds\FrameW\FrameW.ctl
UserControl=VBCCR15\Builds\HotKey\HotKey.ctl
UserControl=VBCCR15\Builds\IPAddress\IPAddress.ctl
UserControl=VBCCR15\Builds\ImageCombo\ImageCombo.ctl
UserControl=VBCCR15\Builds\ImageList\ImageList.ctl
UserControl=VBCCR15\Builds\LabelW\LabelW.ctl
UserControl=VBCCR15\Builds\LinkLabel\LinkLabel.ctl
UserControl=VBCCR15\Builds\ListBoxW\ListBoxW.ctl
UserControl=VBCCR15\Builds\ListView\ListView.ctl
UserControl=VBCCR15\Builds\MCIWnd\MCIWnd.ctl
UserControl=VBCCR15\Builds\MonthView\MonthView.ctl
UserControl=VBCCR15\Builds\OptionButtonW\OptionButtonW.ctl
UserControl=VBCCR15\Builds\Pager\Pager.ctl
UserControl=VBCCR15\Builds\ProgressBar\ProgressBar.ctl
UserControl=VBCCR15\Builds\RichTextBox\RichTextBox.ctl
UserControl=VBCCR15\Builds\Slider\Slider.ctl
UserControl=VBCCR15\Builds\SpinBox\SpinBox.ctl
UserControl=VBCCR15\Builds\StatusBar\StatusBar.ctl
UserControl=VBCCR15\Builds\SysInfo\SysInfo.ctl
UserControl=VBCCR15\Builds\TabStrip\TabStrip.ctl
UserControl=VBCCR15\Builds\TextBoxW\TextBoxW.ctl
UserControl=VBCCR15\Builds\ToolBar\ToolBar.ctl
UserControl=VBCCR15\Builds\TreeView\TreeView.ctl
UserControl=VBCCR15\Builds\UpDown\UpDown.ctl
Sample errors:
Quote:
'DataReport1' can not be public in this type of project. The item has been changed to private.
Quote:
Errors during load. Refer to 'X:\repo\VBCCR15\Builds\Animation\PPAnimationGeneral.log' for details
The log file shows:
Quote:
Line 12: Class VBCCR15.CheckBoxW of control CheckMouseTrack was not a loaded control class.
Line 22: Class VBCCR15.ComboBoxW of control ComboMousePointer was not a loaded control class.
Line 32: Class VBCCR15.ComboBoxW of control ComboBackStyle was not a loaded control class.
Line 42: Class VBCCR15.CheckBoxW of control CheckCenter was not a loaded control class.
Line 52: Class VBCCR15.CheckBoxW of control CheckAutoPlay was not a loaded control class.
Line 62: Class VBCCR15.CheckBoxW of control CheckEnabled was not a loaded control class.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
oh man... the OCX project is not meant to be incorporated into another project. The source is provided so you can compile the original OCX, (hopefully with a copy of an already compiled version to keep binary compatibility!)
Quote:
It is not recommended to use the source code to compile another binary.
If you want to use these outside of the OCX - use the std EXE project code.
if you don't know what the manifests are for - or why you use them, don't download them. you don't need them.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hi Krool,
This is about using the VBCCR15.OCX Registration-Free.
I have used VBCCR15.OCX in our project. Now I need to use the project's executable file in end user machine without registering the .OCX file.
I have registered the VBCCR15.OCX file in my machine. Please tell me about the follows.
1) Can we just include the Side-by-side resources (as in your comment) anywhere inside the project?
2) Do we need to add those side-by-side resources in the same folder with .exe and .ocx file in the 'End user' machine?
Thank you.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
kaps
1) Can we just include the Side-by-side resources (as in your comment) anywhere inside the project?
What you mean with anywhere? It can only be added into the Resource section in the Std-EXE project.
Quote:
Originally Posted by
kaps
2) Do we need to add those side-by-side resources in the same folder with .exe and .ocx file in the 'End user' machine?
The resource file is embedded into the .exe file. No resource file is placed on any folder.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hi Krool,
Thanks for the reply.
I think I haven't mention about the right scenario of my project in my previous comment. I am sorry for that.
We have used VBCCR15.OCX in our project and our final result is a .dll file (Ours is not a Standard EXE project and it is a ActiveX DLL project ). We create an executable file separately to include the Project.dll file and other relevant files into the client computer, and now I want to use the Project.dll file without registering the VBCCR15.OCX file in the client machine. Can we still use the steps mentioned by you in your tutorial?
However I have tried to include the Side-By-Side resource files that you have attached into the project. I am unable to add more that one resource file into the project and also unable to add VBCCR15.OCX.rar , unsupportive format. I guess this is because this is a ActiveX DLL project.
I used http://www.mazecomputer.com/ and created a manifest file(Project.dll.manifest) by adding our Project.dll and VBCCR15.OCX into the Side-By-Side manifest maker. I am still unable to fulfill my need. Can you please help me with this.
Thank you.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello,
Here is the last update of my converter for the latest version of VBCCRxx (15).
Translates sources using VBCCR xx to version 15.
All converted files are saved (.bak) as a precaution.
When you have a project of 10000 lines, it's handy!
Fixed a bug in the conversion of the vbp file (Thanks MountainMan)
Good work
Attachment 157199
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Included LinkSwitch /OPT:NOWIN98 on the VBCompiler which reduced the file size of the OCX binary by about ~10KB
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello Krool,
awesome replacement for the MS controls. They look nice!
I got a problem, and I hope I didn't miss something silly. I'm trying to use the datepicker control with CalendarShowWeekNumbers = TRUE.
When I click on the datepicker nothing happens. This works fine when the option is OFF.
Please tell me what I'm doing wrong.
Thanks, Stephan
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
When adding VB Common Controls Replacement 1.5 Library to an exist VB6 project and try to open it again it gives the following error:
Run-time error '713
Class not registered
It works OK with any new project!
Am I missing something?!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Update released.
VBCCR16.OCX
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
First of all, congratulations for this great job.
Recently I needed to translate a program with unicode characters, So your controls had been fantastic.
Everything worked perfect except just one thing, that I'm not able to fix myself (I've not enougth skills).
I use traffic light icons to show states. At the startup, I load this 3 images (red, orange and green) from my resource and store them to global variables.
In most of my forms, I show a listView with this icons, so I have on each form, one imageList and one listview controls. The problem consist in everything works OK, but just once, I mean, doesn't matter witch form I open first, but first time everything is OK, on the following ones, instead the trafic light, I got a black square. Same code worked before as a charm on the original microsoft controls.
I got a method that prepare that list before it is populated.
Code:
Public iOrange As IPictureDisp
Public iGreen As IPictureDisp
Public iRed As IPictureDisp
Public Sub PreparaSemaforsBreuW(ByRef IL As VBCCR16.ImageList, ByRef LV As VBCCR16.ListView)
Dim CH As VBCCR16.LvwColumnHeader
IL.ListImages.Clear
IL.ListImages.Add 1, , iOrange
IL.ListImages.Add 2, , iRed
IL.ListImages.Add 3, , iGreen
IL.UseMaskColor = True
LV.ForeColor = DG.InvColor
LV.BackColor = DG.BGColor
Set CH = LV.ColumnHeaders.Add(1, , "Tittle", 1800)
LV.HideColumnHeaders = False
LV.Width = 1800 + 270
Set LV.SmallIcons = IL
LV.BorderStyle = CCBorderStyleNone
End Sub
Then I populate like this
Code:
LV.ListItems.Add(, , 1234, , 3)
I tested with VBCCR15.OCX and with the current version 1.6.4 VBCCR16.OCX
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Sorry, I forget to mention, that the problem only apears on compiled DLL, when debug work OK.
Ups, Don't know why, seems this post appears before the original (that I got a message, telling me that must be approved by moderator first).
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello, Again, this is disturbing, don't know why seems today is working perfect on compiled version.
Respect to the microsoft original code, I Added this piece of code (already present on previous post), and seems helped. Maybe will help you to realize what's going on
Code:
IL.ListImages.Clear
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello, Again, this is disturbing, don't know why seems today is working perfect on compiled version.
Respect to the microsoft original code, I Added this piece of code (already present on previous post), and seems helped. Maybe will help you to realize what's going on
Code:
IL.ListImages.Clear
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello misern,
Thanks for your report. Can you please bundle an isolated demo showing the issue so I can evaluate the reason.
-
1 Attachment(s)
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello,
Attached a sample source code. On my PC, from IDE it works OK, but the exe, only once
Attachment 162661
Please remove the docx suffix
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
misern, thanks.
unfortunately I could not resolve it. It's not happening when using the Std-EXE version. Only when compiled and use of OCX.
Further observation: When you load just on image at design-time to the image list directly then there is no issue. You can keep all code unchanged. Just add a random picture at design-time to the image list on form2 and form3 and the issue is gone. I don't know why...
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello Krool,
Many thanks for your time an effords. I suspect that picture is deleted on form unload. I'm thinking to assign a cloned image.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
misern,
I have resolved the issue with the ImageList. You can use your code unchanged.
Quote:
Originally Posted by
misern
Respect to the microsoft original code, I Added this piece of code (already present on previous post), and seems helped. Maybe will help you to realize what's going on
Code:
IL.ListImages.Clear
That's not necessary (anymore)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Many thanks, I just tested, works perfect!!!!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
I might be missing something obvious, but why does CommonDialog.cls need to use registry entries to be used in scripts vs just having the class Implement IObjectSafety?
Thanks!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
DEXWERX
I might be missing something obvious, but why does CommonDialog.cls need to use registry entries to be used in scripts vs just having the class Implement IObjectSafety?
Thanks!
There is a good reason for this.
Having Implements in UserControl is no problem as only an amalgamation is exposed in the OCX.
However, using Implements in Classes exposes the interfaces directly.
Means: any one using OCX would need to install OLEGuids.tlb and that's a no-go.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
ah! Thanks.
That's too bad that Classes are treated differently than User Controls in the OCX.
-
Name conflicts with existing module, project, or object library
In a new VB project everything works perfectly.
But when I try to add 'VB Common Controls Replacement 1.6 Library' in my existing project from 'Project > Components' box and click on Apply button, I get the message "Name conflicts with existing module, project, or object library". Does anyone have solution?
-
Re: Name conflicts with existing module, project, or object library
Quote:
Originally Posted by
pramod9763
In a new VB project everything works perfectly.
But when I try to add 'VB Common Controls Replacement 1.6 Library' in my existing project from 'Project > Components' box and click on Apply button, I get the message "Name conflicts with existing module, project, or object library". Does anyone have solution?
The file VBCCR16. OCX was mentioned twice in the VBP file of my project that caused the problem. I deleted both mentions in the file and referenced file again. This time it loaded perfectly!
-
Re: Name conflicts with existing module, project, or object library
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
The ComboBoxW control allows to edit at Property Style= 0. What if I don't want the user to edit in the control. I just want him to select item from drop-down list. I tried using property Locked = True. But then ComboBoxW only let the user to Drop the items but it does not let him select the item.
Please suggest a solution!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
The ComboBoxW control allows to edit at Property Style= 0. What if I don't want the user to edit in the control. I just want him to select item from drop-down list. I tried using property Locked = True. But then ComboBoxW only let the user to Drop the items. However, it does not let him select the item.
Please suggest a solution!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
pramod9763
The ComboBoxW control allows to edit at Property Style= 0. What if I don't want the user to edit in the control. I just want him to select item from drop-down list. I tried using property Locked = True. But then ComboBoxW only let the user to Drop the items. However, it does not let him select the item.
Please suggest a solution!
I should have used Property Style = 3.
That solved the problem!
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hello,
Is there any thing similar to VisualStyles that can be done to the aspect of the forms?
Thanks
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
PauloFranc
Hello,
Is there any thing similar to VisualStyles that can be done to the aspect of the forms?
Thanks
Forms are automatically visual styled. Or what do you mean exactly?
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Ok, thanks.
I was just wondering about the borders and format of the corners for example.
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Ok, thanks.
I was just wondering it I should do something about the borders and format of the corners for example.
-
1 Attachment(s)
LinkLabel Bug
Hi Krool,
first, thanks for your great work.
I encountered a bug when using your ActiveX Component.
LinkLabel control with transparent back style, works great in normal DPI size (96 DPI - 100%). But, in 192 DIP (200%), it completely cluttered and the background color becomes black. By changing the Transparent Property to False, everything works well again.
Attachment 171531
I apologize for my poor English.
Thanks
-
2 Attachment(s)
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
I have a problem with the DTPicker control!
It works ok as long as the application is loaded without manifest file (not themed) like this :
Attachment 171541
When loaded with the manifest (.manifest File or even Resource) it looks like this :
Attachment 171543
The format is reversed which ruins the display and causes a lot of confusion.
My Windows regional setting are:
Format: Arabic Egypt
Location: Egypt
When I change the Format to, say, English (United States) it works ok.
I tried to change the system date format from code before initializing the theme but it does not work.
Although Arabic is Right To Left language but numbers, dates and time is left to right (well, Date can be used both ways but not Time)
Even if we typed in Hindu numbers all is left to right except date unless we type in Arabic numbers it is Left to Right for All:
Hindu date and Time:
٢٠١٩/١٠/١٣ (all is right to left) or ١٣/١٠/٢٠١٩ (all is left to right but its ok as long as years are in YYYY format)
٠٧:٤٢ ص (hours are left and minutes are right) in the themed screen shot time is 42 as hours and 7 as minutes which is wrong!
Arabic numbers:
13/10/2019 (all left to right)
07:42 ص (all left to right)
Any suggestions?
-
Re: LinkLabel Bug
Quote:
Originally Posted by
kavian
Hi Krool,
first, thanks for your great work.
I encountered a bug when using your ActiveX Component.
LinkLabel control with transparent back style, works great in normal DPI size (96 DPI - 100%). But, in 192 DIP (200%), it completely cluttered and the background color becomes black. By changing the Transparent Property to False, everything works well again.
Attachment 171531
I apologize for my poor English.
Thanks
Please try LinkLabel1.Refresh for the meantime. It should resolve it. I'm looking for a fix which will makes the .Refresh not needed.
EDIT: OCX has been updated. It should now work even without extra .Refresh.
-
2 Attachment(s)
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Hi Krool, Thanks for update. now the control is working properly.
But two more. In 200% DPI:
1. The label size doesn't change correctly (Autosize property is set to True).
Attachment 171773
2. The icon size of any controls that use the ImageList, doesn't change correctly. Also the Toolbar control, isn't DPI-aware. These bugs are not present in the Std-EXE version.
Attachment 171775
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
kavian
But two more. In 200% DPI:
1. The label size doesn't change correctly (Autosize property is set to True).
Attachment 171773
AutoSize for LabelW at design time is only a 1 time Autosizing, because the behavior is then that the size can be freely changed afterwards..
It works when design time DPI is same as run time DPI.
However, to be sure in all cases it is better to apply an .AutoSize = True during Form_Load again.
The intrinsic VB.Label has the same behavior. So I don't consider this as a bug, but rather a feature. :)
-
Re: [VB6] ActiveX CommonControls (Replacement of the MS common controls)
Krool,
I have 3 questions regarding using the OCX version of the controls.
1 - What modules, if any, of the Std-EXE version need to be included when we use the OCX version? You have 3 modules int eh Std-EXE version that are general to all of the forms, Common.bas, Startup.bas and VisualStyles.bas. Are any of these needed to use the OCX version?
2 - In the Std-EXE version demo, at the start of each of the forms is code to call SetupVisualStylesFixes which resides int he aforementioned VisualStyles.bas module. Do we need to do this at the start of any/all our forms to get theming and visual styles or is that done automatically in the OCX version?
3 - If these are no specials subs to run at startup using the OCX version, then is there still the requirement that the program starts from Sub Main instead of going to a form? If so, what initialization code should we call before going to a form?
As a general comment, it might be nice to have a simple sample using the OCX version which would help us understand what we need to do besides side-by-side to get it to work with modern themes etc. If you want, I could cook up your Std-EXE sample for use with the OCX if you can help me understand the start-up things like in my questions above.
Thanks.