Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Controls 15.1.3 and 18.2 > 150% DPI Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Controls 15.1.3 and 18.2 > 150% DPI Problem

 Post Reply Post Reply
Author
Message
Fritzchen View Drop Down
Groupie
Groupie


Joined: 13 December 2017
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (1) Thanks(1)   Quote Fritzchen Quote  Post ReplyReply Direct Link To This Post Topic: Controls 15.1.3 and 18.2 > 150% DPI Problem
    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
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 229
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post 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

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)
Back to Top
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 311
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post 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]
Back to Top
Fritzchen View Drop Down
Groupie
Groupie


Joined: 13 December 2017
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fritzchen Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Fritzchen View Drop Down
Groupie
Groupie


Joined: 13 December 2017
Location: Germany
Status: Offline
Points: 27
Post Options Post Options   Thanks (1) Thanks(1)   Quote Fritzchen Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.062 seconds.