dpi

DPI Scaling in .Net 3.5 in Mixed WinForms and WPF Application

别说谁变了你拦得住时间么 提交于 2019-12-18 07:45:38
问题 In this post, CodeNaked discusses how to change the TextFormattingModeProperty of the application. This solves my problem (see below) perfectly in .Net 4. However my production application is in .Net 3.5 which doesn't have that property at all. How do I accomplish the same thing in .Net 3.5? My root problem: I have a winforms application based in .Net 3.5 that has some WPF controls on certain screens. When the Windows DPI setting is set to 150% (not 120%), scaling occurs as expected. However,

WinForms Different DPI Layouts

女生的网名这么多〃 提交于 2019-12-18 05:05:14
问题 Somehow forms and controls created through Visual Studio and the designer have the great ability to scale themselves depending on the current DPI/font size of Windows. One portion of my UI is a tab control full of dynamic pages and labels/inputs generated depending on the user's selection. When these are created, they use hard coded sizes that look right for 96 DPI. Is there an automated way in .Net to take these generated controls and do the same resizing that is performed for the designer

Supporting DPI and Default Font Changes

不羁岁月 提交于 2019-12-18 03:03:12
问题 So I'm trying to figure out how the Form's AutoScaleMode property can possibly help to support a system with a font or DPI that is different from my work development machine. From the SDK: AutoScaleMode Enumeration public enum AutoScaleMode None Automatic scaling is disabled. Font Controls scale relative to the dimensions of the font the classes are using, which is typically the system font. Dpi Controls scale relative to the display resolution. Common resolutions are 96 and 120 DPI. By

Get physical screen size in Qt

天涯浪子 提交于 2019-12-17 23:37:41
问题 I'km working in Qt, i need help to get the physical size of the screen (monitor), In Qt one can get a QDesktopWidget from QApplication , I mean: QDesktopWidget *mydesk = QApplication::desktop(); The QDesktopwidget has some methods to get the resolution in pixels and some to get the the size in milimethers: mydesk-> widthMM(); mydesk->heightMM(); However, this does not correspond to the physical size, when I measure my screen with a ruler, there is a considerable difference. Also one can get

Changing DPI scaling size of display make Qt application's font size get rendered bigger

一个人想着一个人 提交于 2019-12-17 23:29:12
问题 I have created some GUI application using Qt. My GUI application contains controls like push button and radio button. When I run the application, buttons and fonts inside button looks normal. When I change the DPI scaling size of display from 100% to 150% or 200%, font size of controls rendered bigger but not control size (pushbutton, radio button) irrespective of resolution. Due to this the text inside controls were cut off. please see the attached image. Qt application look when DPI scaling

Detect if non DPI-aware application has been scaled/virtualized

人走茶凉 提交于 2019-12-17 19:43:16
问题 I'm trying to detect in a WinForms application if it has been launched in scaled/virtualized mode due to the OS having a high DPI. Currently, in a system running at 3840x2400 with 200% scaling, the application sees the resolution as 1920x1200, the DPI as 96, and the scale factor is 1. We are in the process of making the application DPI-aware, but until then, we need a "quick fix" that will allow us to detect if scaled. The reason for this is that it breaks a functionality in the application

Write dpi metadata to a jpeg image in Java

只愿长相守 提交于 2019-12-17 19:33:44
问题 I am trying to programatically set the dpi metadata of an jpeg image in Java. The source of the image is a scanner, so I get the horizontal/vertical resolution from TWAIN, along with the image raw data. I'd like to save this info for better print results. Here's the code I have so far. It saves the raw image (byteArray) to a JPEG file, but it ignores the X/Ydensity information I specify via IIOMetadata. Any advice what I'm doing wrong? Any other solution (third-party library, etc) would be

Printing page with bootstrap 3

喜你入骨 提交于 2019-12-17 17:41:42
问题 I've been looking through a lot of answers here on stackoverflow that semi-cover what I'm wondering about, but haven't found anything that worked for me. I understand that the printing page is about 550 px for A4 and therefor bootstrap will use the styles and layout usually used for mobile devices. When I use Ctrl+P for my web page, the printable page looks just like the mobile version of my page. But how do I make it look like the desktop version? (media > 1024 px) Is there a way to do this?

Declaring high DPI awareness per window on Windows 8

时光怂恿深爱的人放手 提交于 2019-12-17 16:26:50
问题 I'm developing audio plugins that run within a host such as Cubase, and I'm looking to add High DPI support. This is problematic because all host applications that I know of declare themselves as non-high DPI aware, so all windows are scaled automatically by the DWM. I'm looking for a way to turn off DWM DPI scaling for the plugin window, even if the host itself is not DPI-aware (so it uses DWM DPI scaling for all other windows). Does anyone know if this is possible at all? For applications

Why Nexus 6 density is 560 dpi?

元气小坏坏 提交于 2019-12-17 16:15:20
问题 How to prepare resources for Nexus 6? If I put images to xxxhdpi they will scale down and lose quality. I put images to xxhdpi they will scale up and lose quality. Why developers decided setup value 560dpi for density, if real density 493ppi is more closer to xxhdpi ~480dpi? The Nexus 6 boasts an impressive 5.96” Quad HD screen display at a resolution of 2560 x 1440 (493 ppi). This translates to ~ 730 x 410 dp (density independent pixels). Nexus 6 has a quantized density of 560 dpi, which