DateTimePicker is distorted after updating Windows 10 Creators

Application built using VS 2015, C #, Winforms, using the Windows DateTimePicker control, the text is distorted after upgrading computers to Windows Creators Update.

Garbled Text Image

Does anyone else come across this or is there some kind of job proposed?

+8
c # winforms
source share
12 answers

In June, a cumulative update for Windows 10 (KB 4022725) includes an updated COMCTL32.DLL that contains a fix for this problem. After installing the update, the file version should be 5.82.15063.413.

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

+3
source share

Enable visual styles in the WinForms application until a form containing DateTimePicker appears.

Application.EnableVisualStyles(); //Form1 contains the DateTimePicker component Application.Run(new Form1()); 
+5
source share

Do you have a high resolution display? Even if you do not, there is a good chance that the updated dpi scaling will be a mistake. If so, you can “fix” it simply by setting the dpiAware and dpiAwareness the manifest file for your project, as described here:

High DPI Scaling Enhancements for Desktop Applications in Windows 10 Creators Update

I have not had to do this yet, so right now I can only indicate where to look for, and not exactly what the correct values ​​should be for your situation.

Even if this is not your problem, you can spend several minutes to ensure that your application copes with the situation in High-DPI. It is also a worthy excuse to get your company to buy you a new new monitor :)

+2
source share

Enabling XP Visual Styles fixed this for me.

+2
source share

So, Windows 10 1703 introduced some new problems, among which this strange refusal to display the date in the DateTimePicker control if you did not check the "Enable XP visual style" field for the application (or do it programmatically). This setting fixes the date problem, but now other controls such as drop-down windows, drop-down lists, text boxes and buttons are becoming flat and dull. Not good. What do we need, is this a real fix that makes the "visual XP style" unnecessary, or is Windows Forms programming out and therefore not fun to maintain?

+2
source share

I also came across this today. My datetimepicker was done in a very random way, but was never accepted. I have this as a kind of workaround: My environment is VS2015, .net 3.5 and winforms My setup is Surface Pro 3 with a new docker and 2 external res 2560x1440 monitors and a 100% zoom. Added app.manifest for my project since I didn’t have one before. Added dpiAware function for app.manifest for such a system:

 <application xmlns="urn:schemas-microsoft-com:asm.v3"> <windowsSettings> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/System</dpiAware> </windowsSettings> </application> 

I also set AutoScaleMode to None in my form (but got roughly the same result with Inherited). It looks like the dpiAware application helped (but is not 100% stable). This works when starting a compiled application, but does NOT work when debugging from Visual Studio. Then I get only the period (.), Which is my date-division sign.

sample datetimepicker after update to update creators after applying workaround when running compiled exe

this may help a little if you cannot upgrade the application to .net 4.7

+1
source share

So, we have completed the removal of the manifest file, and the control now displays correctly. What is strange is the fact of including a new manifest file with only the assemblyIdentity tag with the version and name, which makes this Windows control ugly. I understand that for others, removing a manifest may not be an option, but it reinforced our problem.

0
source share

We are getting this same problem. VB.NET VS 2012.NET 4.5. Occurs from time to time. I also posted this on

https://connect.microsoft.com/VisualStudio/feedback/details/3129203/date-in-datetime-of-mfc-application-is-getting-cropped-in-win10-redstone2-build-15055

0
source share

I tried most of the suggestions here and elsewhere, including manifest changes, .NET 4.7, etc. However, one additional change that was required in my setup was to increase the size of the CalendarFont of the control itself.

By default, my system was 7.875. Changing it to 10pt fixed the display problem (changing it to a slightly lower value improved the display, but did not fix it).

Disclaimer: This has not been verified in depth and may violate other scenarios. This information is for finding the ultimate solution.

0
source share

Like others, they suggested that this line was in your main form, and it worked for me:

 Application.EnableVisualStyles() 

You can also uncomment the lines below in app.manifest . It depends on the project.

0
source share

A fix for this problem is planned to be included in the June cumulative update for Windows 10.

0
source share

This is a bug in the date picker control implemented in COMCTL32.DLL 5. This should be fixed in the near future.

The date time control implemented in version COMCTL32.DLL version 6 does not appear to be affected by this problem.

0
source share

All Articles