Question

After enabling our aplication to use AutoScaleMode = DPI we are getting a strange issue when we show the PrintDialog at a DPI greater than 96. After the PrintDialog has been shown the text size on certain controls already showing is increased over the already scaled size. On forms that are opened after, the controls are scaled correctly but the font is back to the size it would be for 96 DPI.

Surely other people must be using this combination, does anyone know what would be causing this and if there is a solution?

Was it helpful?

Solution

It looks like this bug is only present on Windows Vista as on our Windows 7 64 bit machines this is not an issue.

On Vista 32 bit setting oDialog.UseEXDialog = false; seems to solve the issue; but after looking at the PrintDialog code in reflector it looks like this would only work for the 32 bit version and would not solve the problem on a 64 bit Vista machine.

It looks like we will just limit support of DPI scaling to Windows 7 or newer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top