Page 1 of 2
ComoBox and DPI 120
Posted: 03 Feb 2010, 14:46
by Mex
Hi
1) Change Windows DPI to 120 (Large)
2) Add ComoBox to form
3) Set style to Edit field only
Run program.
Notice strange double border or box at the bottom of the control.
Re: ComoBox and DPI 120
Posted: 03 Feb 2010, 14:50
by Mex
Hmm i think its some paint issue
when style is set to Edit field only, you can resize the combobox and see what happens.
Re: ComoBox and DPI 120
Posted: 03 Feb 2010, 22:36
by TiKu
It seems to be at least partially related to the used font. Place a VB6 combo box and my combo box next to each other and configure both to use the same font (don't forget about the UseSystemFont property). With such a setup, my control is still wrong, but the failure is only 1 pixel instead of 2 as in your first screenshot.
I'll have to do more checks.
Re: ComoBox and DPI 120
Posted: 04 Feb 2010, 00:21
by TiKu
I think I've fixed it. Could you please test the attached build, especially with different fonts?
Re: ComoBox and DPI 120
Posted: 04 Feb 2010, 13:43
by Mex
Hello
Yes, it's OK now, danke

Re: ComoBox and DPI 120
Posted: 29 Apr 2010, 11:32
by anditop
Hi,
I have the same problem using the control with styles "Edit Field + Drop-Down List" and "Drop-Down List only":
With setting DPI 120 the control does not show the drop down when I click it. I only can change the items by cursor keys.
Updating and registering the new OCX Version 1.1.1 does not help. The problem still exists for drop downs.
Changing controls font settings does not change anything...
Do you have any idea?
Andreas
Re: ComoBox and DPI 120
Posted: 29 Apr 2010, 14:12
by TiKu
Have you played around with the ListHeight and MinVisibleItems properties? On which versions of Windows does this happen? Does your app use comctl32.dll 6, i.e. XP themes?
I'll have a look later.
P.S.: When changing the font, keep in mind that there is a UseSystemFont property which defaults to True.
Re: ComoBox and DPI 120
Posted: 30 Apr 2010, 09:18
by anditop
I played around with some properties. ListHeight and MinVisibleItem does not solve anything.
But: Changing the SelectionFieldHeight property let the control behave strange:
Behaviour 96 DPI: The SelectionField height is set to the property value, the Dropdown height depends on the item count => expected!
Behavior 120 DPI: The SelectionField height is set to default height, the Dropdown height is set to the property value => not expected!
See attached screenshots with SelectionFieldHeight=40.
Unfortunately this is not a solution or workaround because changing this property would only help for exactly one DPI value.
I tried all for WinXP SP2/Sp3 and Win7. There is no difference.
I also attached a very simple VB6-Project without any additional references (zip-file).
I hope this is helpful.
Re: ComoBox and DPI 120
Posted: 30 Apr 2010, 18:16
by TiKu
Many thanks, I'll try to fix this problem as soon as possible.
Re: ComoBox and DPI 120
Posted: 04 May 2010, 21:57
by TiKu
anditop wrote:With setting DPI 120 the control does not show the drop down when I click it. I only can change the items by cursor keys.
One thing I found out so far (I had not yet much time to look at it): This problem doesn't occur, if the app uses themes, i.e. comctl32.dll 6.0. I also found out, that the drop-down list box temporarly is sized correctly while the control is loaded, but afterwards it is shrinked to 2 pixels for some reason.
Re: ComoBox and DPI 120
Posted: 06 May 2010, 23:03
by TiKu
I'm getting a bit closer. I don't know what actually is going wrong, but I've found a possible work-around. It's not fully working yet, but I'm confident that I'll get it working.
Re: ComoBox and DPI 120
Posted: 09 May 2010, 10:10
by TiKu
Please try the attached build.
Re: ComoBox and DPI 120
Posted: 10 May 2010, 12:43
by anditop
The first test with my simple dummy application was successful!
Good job!!
I will do some more tests (I hope I have enough time to do it the next days) and let you know ...
MANY THANKS
Re: ComoBox and DPI 120
Posted: 01 Jun 2010, 11:25
by anditop
I am sorry but I had not much time to test the new version 1.1.2 in the last weeks.
Today I spended some more time with it.
I am also sorry to tell you that there are still problems with the combobox control:
If I set "Width" or "Height" property, the dropdown still is not shown with setting 120 dpi.
It is strange, because not all values of the properties effects the issue...
e.g. following values are affected:
ComboBox1.Width = 1500
ComboBox1.Height = 240
Do you have any idea?
Re: ComoBox and DPI 120
Posted: 04 Jun 2010, 22:46
by TiKu
I'll try to fix it. Combo boxes seem to be a big mess when it comes to non-standard dpi settings. I cannot remember another control that requires that much extra work to make it support non-standard dpi settings. For instance the date time picker control, that also has a drop-down portion, seems to work fine with non-standard dpi settings out out the box.
Some more information would be great:
- Do you use a manifest (version 6 of comctl32.dll)?
- On which version(s) of Windows does the problem occur?