highdpi

Graphics.MeasureString returns different values than Win32 GetTextExtent

天大地大妈咪最大 提交于 2019-12-10 10:06:06
问题 i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find the average width of a character starts from getting the width of all alphabetic characters and divide by 52: size = dc.GetTextExtent( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 52); averageWidth = size / 52; Microsoft has a page that

Windows: How to test UI under high-dpi?

别说谁变了你拦得住时间么 提交于 2019-12-09 09:02:03
问题 i want to test how my application reacts to high -dpi settings. i don't just mean 120dpi. i want to test higher dpi settings, such as: 150dpi 300dpi 600dpi 1000dpi 1200dpi My development machine's video card cannot do the resolutions required to have 300dpi, (or even 150dpi for that matter). Assuming the interface is designed to ' fit ' on a display with 768 lines (e.g. 1024x768), the resolution required for the higher-dpi settings would be: Normal Wide-Screen Frame Buffer dpi Resolution

How to activate “disable display scaling on high dpi settings” programatically [duplicate]

被刻印的时光 ゝ 提交于 2019-12-06 01:57:10
问题 This question already has answers here : How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)? (5 answers) Closed 3 years ago . I am developing Windows form application using C# on Visual Studio 2010. I found that this application is scaled if I used high dpi display setting. But if I activate file property "disable display scaling on high dpi settings" by mouse right click menu on windows explorer, it seems that it is not scaled. Is there a way to

Graphics.MeasureString returns different values than Win32 GetTextExtent

断了今生、忘了曾经 提交于 2019-12-05 22:33:33
i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find the average width of a character starts from getting the width of all alphabetic characters and divide by 52: size = dc.GetTextExtent( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 52); averageWidth = size / 52; Microsoft has a page that lists the average character widths for some font sizes at certain DPI settings, and i've confirmed

How can I scale fonts on a high resolution screen?

此生再无相见时 提交于 2019-12-05 06:32:05
On a high-resolution screen (my example, Windows 8.1) is my Java application. The menu in particular is very small, and it's almost impossible to select a menu item. In the normal screens (72 DPI) everything is OK. Font with a fixed size (in my case it would have <80px), is a poor choice. 72 DPI screens show it very large. How can I make the fonts scalable so that the program conforms to its size, or the user gets the possibility of setting? tucuxi You can change the default font size in a single place by accessing your PLAF: Java Swing on high-DPI screen but this will still make the

Icons sizing not increasing in higher DPI

浪子不回头ぞ 提交于 2019-12-04 21:39:13
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. 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 100. The property autosize does not help here. The file of the icon can contain within different sizes so

How to activate “disable display scaling on high dpi settings” programatically [duplicate]

。_饼干妹妹 提交于 2019-12-04 09:11:14
This question already has answers here : How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)? (5 answers) Closed 3 years ago . I am developing Windows form application using C# on Visual Studio 2010. I found that this application is scaled if I used high dpi display setting. But if I activate file property "disable display scaling on high dpi settings" by mouse right click menu on windows explorer, it seems that it is not scaled. Is there a way to activate "disable display scaling on high dpi settings" programatically on Visual Studion 2010 C# or upper

R / RStudio : graph scaling issues & fuzziness on high dpi screens

杀马特。学长 韩版系。学妹 提交于 2019-12-03 13:50:12
On high DPI 4K monitors it seems that under Windows the RStudio plot window uses pixel doubling to make the plot legible (I'm using RStudio 0.99.483 and R 3.2.2 and Windows 8.1, but same result under Windows 10). This results in really fuzzy text & graphics (plus doesn't play well with Cleartype, as it results in colour fringing after pixel doubling). Example: qplot(Sepal.Length, Petal.Length, data = iris, color = Species, size = Petal.Width, alpha = I(0.7)) with zoom in RStudio set to 200% gives me a fuzzy image (with colour fringing) like Zooming out completely in turn gives me a sharp image

Windows: How to test UI under high-dpi?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 10:42:30
i want to test how my application reacts to high -dpi settings. i don't just mean 120dpi. i want to test higher dpi settings, such as: 150dpi 300dpi 600dpi 1000dpi 1200dpi My development machine's video card cannot do the resolutions required to have 300dpi, (or even 150dpi for that matter). Assuming the interface is designed to ' fit ' on a display with 768 lines (e.g. 1024x768), the resolution required for the higher-dpi settings would be: Normal Wide-Screen Frame Buffer dpi Resolution Resolution Zoom Size (MiB) ======= ============ ============ ====== ============ 96 1024 x 768 1280 x 768

How to create a high quality icon for my Windows application?

▼魔方 西西 提交于 2019-12-03 03:34:08
问题 If you are running Windows with a higher DPI setting you will notice that most application icons on the desktop look terrible. Even some high profile application icons such as Google Chrome look terrible while Firefox, Skype and MS Office icons look sharp: (example) I suspect that most icons look blurry because a lower resolution icon is scaled up rather than using a higher resolution icon. I want to give my application a high quality icon and can't seem to convince Windows to use the higher