Controls 15.1.3 and 18.2 > 150% DPI Problem |
Post Reply |
Author | |
Fritzchen
Groupie Joined: 13 December 2017 Location: Germany Status: Offline Points: 27 |
Post Options
Thanks(1)
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 |
|
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Please see my topic here: 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) |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
unfortunately I can confirm it.
Have exactly same problems! 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]
|
|
Fritzchen
Groupie Joined: 13 December 2017 Location: Germany Status: Offline Points: 27 |
Post Options
Thanks(0)
|
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 |
|
Fritzchen
Groupie Joined: 13 December 2017 Location: Germany Status: Offline Points: 27 |
Post Options
Thanks(1)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |