Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DateTimePicker garbled after Windows 10 Creators Update

Application built with VS 2015, C#, Winforms, using the DateTimePicker Windows control, text is garbled after updating machines to the Windows Creators Update.

Garbled Text Image

Has anyone else come across this or is there any suggested work around ?

like image 496
Dan Avatar asked Apr 13 '17 16:04

Dan


3 Answers

Enable Visual Styles in the WinForms application, before the Form containing the DateTimePicker is shown.

Application.EnableVisualStyles();

//Form1 contains the DateTimePicker component
Application.Run(new Form1());
like image 83
user900 Avatar answered Nov 16 '22 05:11

user900


The June cumulative update for Windows 10 (KB 4022725) includes an updated COMCTL32.DLL that contains a fix for this issue. The file version should be 5.82.15063.413 after the update is installed.

https://social.msdn.microsoft.com/Forums/en-US/4cf03067-46c4-4962-af8c-f4b1483e88ba/date-time-picker-garbled-after-windows-10-creators-update?forum=windowsgeneraldevelopmentissues

like image 3
toumir Avatar answered Nov 16 '22 04:11

toumir


Do you have a High-DPI display? Even if you don't, there's a good chance the updated dpi scaling is at fault here. If so, you might be able to "fix" this simply by setting a value in dpiAware and dpiAwareness values of the manifest file for your project as described here:

High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update

I haven't had to do this myself yet, so right now I can only point you where to look, and not to what the exact right values should be for your situation.

Even if this isn't your issue, you may want to spend a few minutes checking that your app handles well in High-DPI situation. It's also a decent excuse to get your company to buy you a nice new monitor :)

like image 2
Joel Coehoorn Avatar answered Nov 16 '22 05:11

Joel Coehoorn