dpi

How to control the font DPI in .NET WinForms app

I created an app for a small business. Some of the employees in the office can not see the form correctly. The reason is they have their DPI setting set to above 96dpi. Does anybody know of a way to control this? For all of you who have experience with winforms apps, how do you control your form layout so that DPI does not affect the ...

.NET 2.0 WinForm: Supporting DPI and Default Font Changes

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 ...

.NET WinForms: Graphics.MeasureString returns different values than Win32 GetTextExtent

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 characte...

Write dpi metadata to a jpeg image in Java

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, ...

Detecting the system DPI/PPI from JS/CSS?

I'm working on a kind of unique app which needs to generate images at specific resolutions according to the device they are displayed on. So the output is different on a regular Windows browser (96ppi), iPhone (163ppi), Android G1 (180ppi), and other devices. I'm wondering if there's a way to detect this automatically. My initial resear...

Image DPI Explained

Attempting to write a definition of DPI has lead me to: DPI (dots), PPI (points), LPI (lines) all refer to the same concept hereafter referred to as DPI. DPI is a device dependent measurement. It says, "This is the resolution of this device." Vector based files are not tied to any one DPI (they expand and contract to conform to a cer...

Do you test on high-res screens and with non-standard/high contrast colour schemes?

I use a non-default Windows colour scheme on most of my machines, and have a laptop with a 124 DPI screen, which Windows is set to. A lot of programs I tested or even use daily seem to have problems with that, showing for example non-standard sizes of controls, cut-off UI elements, unreadable text and so on. There is the whole range fr...

C# WPF resolution independancy?

Hello, I am developing a map control in WPF with C#. I am using a canvas control e.g. 400 x 200 which is assigned a map area of e.g. 2,000m x 1,000m. The scale of the map would be: canvas_size_in_meters / real_size_in_meters. I want to find the canvas_size_in_meters. The canvas.ActualWidth gives the Width in DIU's (Device Independan...

WPF: How to specify units in Dialog Units?

i'm trying to figure out how to layout a simple dialog in WPF using the proper dialog units (DLUs). i spent about two hours dimensioning this sample dialog box from Windows Vista with the various dlu measurements. Can someone please give the corresponding XAML markup that generates this dialog box? (Image Link) Now admittedly i know...

Delphi: Handling user's font preference

I've come up with the call that gets the user's UI font preference (as opposed to Borland's hard-coded choice of "MS Sans Serif"). Let's pretend the user's font preference is: Segoe Print, 15pt I set the font of all items, on all forms, in all applications to: Segoe Print, 15pt Problem is that things are now cut off. Buttons are ...

Get dpi settings via GTK

Using GTK, how do I query the current screen's dpi settings? ...

How to use a different coordinate system in WPF? (scaling only)

Hi, (Let me give you some context) I am currently designing an application that is supposed to generate a printable A4 page based on some data. Naturally, the device independent pixels of WPF (96 pixels/inch) are not a very natural unit of measurement in the paper world. Something like millimetres would be more appropriate. So I got my c...

When printing an image, what determines how large it will appear on a page?

Using Python's Imaging Library I want to create a PNG file. I would like it if when printing this image, without any scaling, it would always print at a known and consistent 'size' on the printed page. Is the resolution encoded in the image? If so, how do I specify it? And even if it is, does this have any relevance when it goes to t...

Can you access sceen display's DPI settings in Silverlight?

Is there a way to access the screen display's DPI settings in Silverlight? If so, how? Thanks, Jeff ...

Can you access sceen display’s DPI settings in a Javascript function?

Is there a way to access the screen display's DPI settings in a Javascript function? I am trying to position a html panel on the page and when the user's DPI is set to large (120), it throws the position off. I need to be able to know what the DPI is so I can adjust the position accordingly. Thanks everyone, Jeff ...

About DPI issue

I have a WIN32 SW which the UI was designed in 96 DPI, so when user changes the windows DPI from 96 to 120 or bigger, the UI will be wrong. I want to know if there is API to force my SW to display the UI with 96DPI. ...

C# Scaling UserControl content to match users Dpi/Font Size

How do I get my OwnerDrawn UserControl to respect the users dpi (96/120/xxx) and/or font-size (normal, large, extra large)? Some people suggest to use the DpiX and DpiY properties on a Graphics object, but that doesn't seem to to anything in my control (i.e. they are always set to 96, regardless of which font-size or dpi I choose). The...

Choosing the right image size in Compact Framework

hello, i'm developping an application in CF 3.5 for windows Mobile 6 Pro using C# and i have a little issue requiring the advice of someone that knows better. Basically, i want my application to run and scale on multiple device sizes and resolutions. Eveything scales properly but the images. Some images that are for example 16X16 will l...

dpi settings over 96 screw up my site

hi, i noticed when the dpi is set high than 96 to like 120 my site gets messed up using either firefox or ie7. the css basically breaks. anyone know a fix for this? thanks ps the site is http://www.iaddesignandstudio.com thnx ...

How can you calculate the appropriate Font Size if the deployment PC has a different font DPI?

I'm trying to figure out the font DPI size on the target Windows machine and modify our app's font so that it appears the same size as it would if the target machine had the same dpi as the dev machine. (So a larger Target DPI would mean we'd make our fonts smaller than at dev time). I'm wondering if there are any problems with the solu...