High DPI
In C# what is the best way to determin that I am running in a High DPI environment.
TIA,
Al
In C# what is the best way to determin that I am running in a High DPI environment.
TIA,
Al
-Ryan / Kardax
Yes, I was thinking of this. Also there is a Screen.PrimaryScreen.Bounds.Width that may be better than Form.Width. I am still hoping for a more direct method. I would like to know how to differentiate between large-format normal-DPI devices and normal-format High-DPI devices, specifically VGA vs. QVGA devices.
Or is this even an issue?
Please take a look at the Graphics.DpiX and Graphics.DpiY properties. You can use them to determine DPI of the screen.
Hope this helps,
Can I capture the screen's graphics object?
I think you can something like the following:
public Form1()
{
Graphics graphics;
graphics = this.CreateGraphics();
this.currentDpiX = graphics.DpiX;
this.currentDpiY = graphics.DpiY;
graphics.Dispose(); // don’t forget to release the unnecessary resources
}
The DPI value for a regular (LowRes) device is 96.
Thank you,
Sergiy.
You could use the installation helper thingy talked about in Mobile 2003 SE SDK but that sounds about as reliable as an Aston Martin Lagonda.