Print Page | Close Window

Controls 15.1.3 and 18.2 > 150% DPI Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=23523
Printed Date: 26 April 2024 at 7:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Controls 15.1.3 and 18.2 > 150% DPI Problem
Posted By: Fritzchen
Subject: Controls 15.1.3 and 18.2 > 150% DPI Problem
Date Posted: 13 December 2017 at 5:52pm
Hello!
Since I have with the version 15.1.3 of my OCX suite (VB 6.0 Pro SP6) probeme with DPI scaling (from > 150%), I had recently loaded the trial version 18.2.

There are still problems:
- ComboBox height does not scale correctly compared to the text boxes (height and width).

- The DockingPane Splitttbar becomes wider when moving.

- The Report Control does not adjust correctly to the window width (Report1.width = Me.ScaleWidth.) The Report Control will come to full window width when you click on it.

- The BackstageButton does not adjust correctly to the window width (BackstageButton1.width = Me.ScaleWidth.) The BackstageButton will come to full window width when you click on it.

- The Tabstripe Control does not adjust correctly to the window width (TabControl1. width = Me. ScaleWidth.) The Tabstripe Control will come to full window width when you click on it.

- The connected TabControlPage is wider than the frame of the Tabstrip control (goes beyond).

I have already tried to focus on the components of Resize, but that doesn't help either.
The controls only enlarge when you click on them. However, it is also not quite correct (see TabControlPage).

All this is possible from a scaling of > 150%.

Tested on Windows 7 SP1 and Windows 10 with Control 15.1.3 and 18.2 (Trail).

Do you have a solution to all these scaling problems?

thanks! :-)
Fritzchen



Replies:
Posted By: Marco1
Date Posted: 15 December 2017 at 9:14am
Please see my topic here: http://forum.codejock.com/forum_posts.asp?TID=23497&PID=76314&title=1820-most-demos-not-hidpi-compliant#76314" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=23497&PID=76314&title=1820-most-demos-not-hidpi-compliant#76314

I think using a HiDPI zoom level different from 100% causes problems, like on my Surface tablet, which is set to 175%.

Oleg, can you please verify this, it's urgent! (I own a lic and could open an issue, but this seems to be a common problem - just test with the demos)



-------------
Product: XTP 18.3.0 on VS 2017
Platform: VS 2017 / Windows 10 (64bit)


Posted By: Jebo
Date Posted: 30 December 2017 at 11:55am
unfortunately I can confirm it.

Have exactly same problems! Confused

4k is meanwhile a new standard. So it is a "must have", that controls works with higher scalings



-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: Fritzchen
Date Posted: 12 January 2018 at 8:42am
Hello, everyone,

I would like to report again about HiDPI and orientation of the components with DPI scaling of 120%, 175% etc. (that is, the "bad" scaling levels).

For all Visual Basic developers who have the problem that controls cannot be resized to full size.

You have to position the components (e. g. the TabBar) as follows (Form_Resize):

With tabMain 'the Tab Control
    .left = 0 '<Your desired beginning>
    .top = 0 '<Your desired beginning>
    .Move .left + Screen.TwipsPerPixelX, .top + Screen.TwipsPerPixelY, Me.ScaleWidth, Me.ScaleHeight '<Your desired values Width and Height>
    .Move .left - Screen.TwipsPerPixelX, .top - Screen.TwipsPerPixelY
End With

In the TabBar the TabBar pages do not use Autosize! Also positions the page manually.

With tcpKommunikation 'Tab Control page
    .left = 15 '<Your desired beginning>
    .top = 450 '<Your desired beginning>
    .Move .left + Screen.TwipsPerPixelX, .top + Screen.TwipsPerPixelY, (Me.ScaleWidth - .left), (Me.ScaleHeight - .top)
    .Move .left - Screen.TwipsPerPixelX, .top - Screen.TwipsPerPixelY
End With

Make sure that your positions are NOT inherited from another control. Makes position information as hard as possible.

In this way you can also align the Report Control correctly.

Sorry for my bad English

Many greetings

Fritzchen

Edit: information changed to avoid misunderstanding


Posted By: Fritzchen
Date Posted: 12 January 2018 at 8:59am
Another comment for all VB developers:

So that the controls do not flicker, the window lock during the "Form_Resize".

This is only an example. the lock and unlock packs into a module, as well as the declaration. e. g. WindowLock Me.hwnd; WindowUnlock Me.hwnd

Lock to begin of the "Form_Resize":
SendMessage(hwnd, WM_SETREDRAW, False, ByVal 0&)

....

Unlock at the end of "Form_Resize":
SendMessage(hwnd, WM_SETREDRAW, True, ByVal 0&)

RedrawWindowAny(hwnd, ByVal 0&, 0, RDW_ERASE Or _
                                   RDW_INVALIDATE Or _
                                   RDW_ALLCHILDREN Or _
                                   RDW_UPDATENOW)


This method works wonderfully for me! I use this in all larger forms and containers.

Many greetings

Fritzchen



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net