Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

[VB6] ActiveX CommonControls (Replacement of the MS common controls)

DEXWERX

PowerPoster
Joined
Jun 23, 2015
Messages
2,224
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!
 

Krool

New member
Joined
Jun 8, 2012
Messages
1,515
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.
 

DEXWERX

PowerPoster
Joined
Jun 23, 2015
Messages
2,224
ah! Thanks.
That's too bad that Classes are treated differently than User Controls in the OCX.
 

pramod9763

New member
Joined
Sep 9, 2019
Messages
8
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?
 
Last edited:

pramod9763

New member
Joined
Sep 9, 2019
Messages
8
Re: 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?

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!
 

pramod9763

New member
Joined
Sep 9, 2019
Messages
8
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!
 

pramod9763

New member
Joined
Sep 9, 2019
Messages
8
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!
 

pramod9763

New member
Joined
Sep 9, 2019
Messages
8
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!
 

PauloFranc

New member
Joined
Sep 11, 2019
Messages
5
Hello,

Is there any thing similar to VisualStyles that can be done to the aspect of the forms?

Thanks
 

PauloFranc

New member
Joined
Sep 11, 2019
Messages
5
Ok, thanks.

I was just wondering about the borders and format of the corners for example.
 

PauloFranc

New member
Joined
Sep 11, 2019
Messages
5
Ok, thanks.

I was just wondering it I should do something about the borders and format of the corners for example.
 

kavian

New member
Joined
Jul 18, 2017
Messages
4
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.

View attachment 171531

I apologize for my poor English.
Thanks
 
Last edited:

labmany

New member
Joined
Sep 26, 2015
Messages
177
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 :

View attachment 171541

When loaded with the manifest (.manifest File or even Resource) it looks like this :

View 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?
 
Last edited:

Krool

New member
Joined
Jun 8, 2012
Messages
1,515
Re: 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.

View 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.
 
Last edited:

kavian

New member
Joined
Jul 18, 2017
Messages
4
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).

View 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.

View attachment 171775
 

Krool

New member
Joined
Jun 8, 2012
Messages
1,515
But two more. In 200% DPI:

1. The label size doesn't change correctly (Autosize property is set to True).

View 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. :)
 

MountainMan

New member
Joined
Feb 4, 2015
Messages
124
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.
 
Top