Status bar in high DPI environment

Posted by: kbj on 22 December 2019, 12:57 am EST

    • Post Options:
    • Link

    Posted 22 December 2019, 12:57 am EST - Updated 3 October 2022, 10:57 pm EST

    The status bar in a high dpi environment, incorrectly calculates vertical character spacing and cuts off the bottom of descending characters.

    as in the “g” in debug

  • Posted 22 December 2019, 6:18 pm EST

    Hello,

    Sorry we can not replicate such issue at our end. In order to replicate the issue, please share a stripped down sample with the following information :

    1 : Build Version of your controls.

    2 :System’s Environment Details (Windows Version and Visual Studio Version)

    3 : DPI value at which you are facing the issue.

    Regards,

    Prabhat Sharma.

  • Posted 24 December 2019, 12:58 am EST

    Hi Prabhat,

    All controls are most recent. Win 10 pro and VB most recent. DPI 144. The problem arises when the status bar visual style is set to Custom

    Thanks,

    Kingman

  • Posted 25 December 2019, 6:10 pm EST

    Hello Kingman,

    Sorry but we can not observe any issue with your mentioned environment and StatusBar is working fine at our end.

    Please find the GIF and sample in the attachment which shows it is working fine at our end.

    If you are doing anything else as shown in the GIF then please modify the sample accordingly and let us know.

    Regards,

    Prabhat Sharma.

    StatusBar.zip

  • Posted 26 December 2019, 1:19 am EST

    Hi Prabhat,

    My vs dpi environment is set for high dpi. I use the following sub Main for the app Startup object. What you are doing (I think) is letting windows scale your app to the higher DPI, which leads to a fuzzier UI. Also, if you scale your main display while developing, you should observe the problem.

    Add the below

    Module moduleGeneral
        '*make app dpi aware*
        <STAThread>
        Public Sub Main()
            'dpi awareness
            If Environment.OSVersion.Version.Major >= 6 Then
                SetProcessDPIAware()
            End If
            Application.EnableVisualStyles()
            Application.SetCompatibleTextRenderingDefault(False)
            'load main form
            Dim f As New Form1
            Application.Run(f)
        End Sub
        <Runtime.InteropServices.DllImport("user32.dll")>
        Public Function SetProcessDPIAware() As Boolean
        End Function
    
    End Module
    

    -Kingman

  • Posted 27 December 2019, 1:24 am EST

    Hello,

    We are investigating on this, will get back to you soon.

    Regards,

    Prabhat Sharma.

  • Posted 29 December 2019, 7:13 pm EST

    Hello,

    We have escalated the case to the developers, will let you know once we get any updates from there side.

    [Internal Tracking ID : 414992]

    Regards,

    Prabhat Sharma.

  • Posted 31 December 2019, 3:55 am EST

    Hi,

    I take that to mean you observed the bug.

    -Kingman

  • Posted 1 January 2020, 10:22 pm EST

    Hello Kingman,

    Yes, we can observe the issue as shown in your attached screenshot.

    If it is a bug then developers will probably fix it and if there is any implementation issue in the code then we will let you know accordingly.

    Regards,

    Prabhat Sharma.

  • Posted 6 January 2020, 5:54 pm EST

    Hello Kingman,

    At our end we noticed that the issue exist when changing the Font size of the item in the Statusbar, just changing the DPI with default font does not create any issue at our end.

    As per the developers the height of status bar is constant and scaled using DPI only and it doesn’t scale on font size.

    As you are facing the issue by changing the DPI only so can you please share a stripped down sample replicating the issue so that we can forward it to the developers.

    Regards,

    Prabhat Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels