highdpi

WinForms window changes dimensions when it encounters an async call

不打扰是莪最后的温柔 提交于 2021-02-07 07:01:23
问题 I have a WinForms project which is several years old and has been retro-fitted with async event-handlers: private async void dgvNewOrders_CellClick(object sender, DataGridViewCellEventArgs e) Inside this method is an async call: var projectTemplate = await GetProjectTemplateFile(companyId, sourceLang, targetLang); When the program runs on a normal resolution screen, it runs as expected. However, when run on a high-DPI screen the window's dimensions - as well as those of all child controls -

Using DEFAULT_GUI_FONT in high DPI Windows application

女生的网名这么多〃 提交于 2020-06-29 11:25:23
问题 I have a Windows application which I want to look good at high DPI monitors. The application is using DEFAULT_GUI_FONT in lots of places, and the font created this way doesn't scale correctly. Is there any simple way to fix this problem with not too much pain? 回答1: you need get NONCLIENTMETRICS by SystemParametersInfo( SPI_GETNONCLIENTMETRICS ,) and then use it LOGFONT data, for create self font. or you can query for SystemParametersInfo( SPI_GETICONTITLELOGFONT ) and use it 回答2: The

Using DEFAULT_GUI_FONT in high DPI Windows application

戏子无情 提交于 2020-06-29 11:25:22
问题 I have a Windows application which I want to look good at high DPI monitors. The application is using DEFAULT_GUI_FONT in lots of places, and the font created this way doesn't scale correctly. Is there any simple way to fix this problem with not too much pain? 回答1: you need get NONCLIENTMETRICS by SystemParametersInfo( SPI_GETNONCLIENTMETRICS ,) and then use it LOGFONT data, for create self font. or you can query for SystemParametersInfo( SPI_GETICONTITLELOGFONT ) and use it 回答2: The

Icons sizing not increasing in higher DPI

自作多情 提交于 2020-01-13 07:24:11
问题 I am facing this issue while DPI is greater than 100. I have changed the size of the icons such as bold, italics and when I run the program in 100 dpi, the icons sizes are bigger but when i run the program after changing to dpi greater than 100 the icons are getting smaller, and not updating to any size values . I have tried autosize = false, imagescaling to none. 回答1: Working with "System.Drawing.Icon" icons you should keep in mind to use a bigger size of the icon if you use DPI greater than

jdk 9 high dpi disable for specific panel

。_饼干妹妹 提交于 2020-01-10 14:32:12
问题 With JDK 9 my swing app works well on Windows with 4k highdpi and normal 1080p normal dpi. Labels, Comboboxes etc. all look nice and are scaled up on the 4k screen. But so is my JPanel where i draw custom images. Can i disable the scaling for this one JPanel to handle drawing myself? I am using apache-commons bicubic interpolation to draw more details on the higher unscaled resolution, but as it is scaled out of the box, i just have the "normal" dimensions to draw. Kind regards 回答1: (EDIT:

How to get sharp UI on high dpi with Qt 5.6?

冷暖自知 提交于 2019-12-31 12:10:24
问题 I am developing on a 4k monitor and its a pain... Finally I managed to set up QtDesigner and then ecountered this issue: When you use QT_AUTO_SCREEN_SCALE_FACTOR=1 and compile an app with radiobutton and other basic widgets, it looks scaled on a 4k screen. Otherwise the dimensions of controls are correct and as expected, its just not sharp, but rather pixelated. I am running on Windows 10 Home 64bit on 4k screen with 200% DPI zoom, using Qt 5.6 RC msvc2015 64bit and tried with achieving the

Mixed WPF and winforms project DPI awareness

空扰寡人 提交于 2019-12-29 07:44:23
问题 I have a C# program that uses both winforms and WPF and I'm struggling to get it to work in high DPI environments. Currently, if I remove all WPF projects from the solution and run it, it will scale fine, however as soon as I add any wpf back in (necessary for the functionality) the scaling fails and the UI becomes unusable. This seems like the exact same issue as previous SO questions: DPI Scaling in .Net 3.5 in Mixed WinForms and WPF Application and Problems getting WinForms to scale

How to get rid of this “edge” in .NET Winforms app?

a 夏天 提交于 2019-12-24 11:53:18
问题 I have a .NET Winforms app that is showing odd edges that I can't get rid of. The edges only appear when <dpiAware> is set to true in app.manifest. I'm on Windows 10 with a high-DPI screen. See the picture below. Any ideas? 回答1: Check whether you use next settings, in: app.config file: <System.Windows.Forms.ApplicationConfigurationSection> <add key="DpiAwareness" value="PerMonitorV2" /> </System.Windows.Forms.ApplicationConfigurationSection> Main() of you application, you set these:

Is it safe to use Delphi visual form designer in high DPI?

给你一囗甜甜゛ 提交于 2019-12-24 03:25:17
问题 In the past we were using standard 96dpi windows most of the time on developer machines, today it is common to go with 120 or even more. Is it safe to save forms in Delphi in high dpi or are there any annoyances or risks involved? I'm not asking how to do my application behave properly with different DPI modes - but asking if Delphi form designer is proven to work correctly in high dpi, so apps with the usual DPI handling techniques will work OK with forms saved with larger PixelsPerInch

Programmatically override the High DPI awareness

旧巷老猫 提交于 2019-12-23 00:42:33
问题 There is a new option for the End User in Windows 10 Creator's Update Edition. The End User can change properties for an EXE on the compatibility tab to "Override High DPI Scaling Behavior" and set it to System (Enhanced). I tested it and it works well for some classic win32 apps. I want to to do this by code through an API call or through the manifest. There is no information on that. Is that possible? From the comment I got, it want to clarify that this is a NEW CREATORS UPDATE FEATURE and