Results 1 to 40 of 4215

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,742

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by LaVolpe View Post
    Yes, if (1440 / Screen.TwipsPerPixelX) <> (1440 \ Screen.TwipsPerPixelX)

    However, and this may not apply to you, but maybe it does. With Win10, one could load forms into different DPI awareness contexts. This means on one form with your controls can be running in per-monitor awareness, while in another form they run in system awareness and in yet in another they run as unaware. In all three cases VB's TwipsPerPixel values do not change. Those values are set when VB initially loads and do not change for the life of the project. When forms are run in a different awareness than what the project loaded into, it has an affect on UCs/OCXs similar to running @ 175% DPI in some cases. I've just discovered that yesterday and am still trying to understand when/why it happens so it can be addressed. I'll follow up once I know more details.
    I understand.
    In logic I first need to fix the object rect to an system DPI aware state and the VB TPP vs real TPP bug within UserControl_Resize.
    I would skip per monitor awareness in that case.

    Then later in another step there could be a DPIMonitorVsSystemScaleFactor(...) which when <> 1 on WM_DPICHANGE_BEFOREPARENT then scale another time object rect accordingly with the current diff factor to system aware state.

    Agree?

    EDIT: maybe this was too easy thought. What happens when the control resizes again due to .Align? I don't know how the behavior is exactly. Maybe such a DPIMonitorVsSystemScaleFactor needs to be done already also within UserControl_Resize...

    It's a messy topic. Something in me tells just stick to system dpi awareness and just don't do a per monitor manifest.
    Even MS states in their memo about it that it still is in early stages where sometimes mixed-mode dpi awareness is necessary.
    So best IMO is to get system dpi aware done properly and don't loose the nerves for per monitor awareness.
    I don't find it bad when the OS bitmap stretches system dpi vs monitor dpi the applications. This at least ensures ecerything is in correct physical sizes.
    Last edited by Krool; Oct 8th, 2019 at 12:54 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width