0

I make an Application simmilar to Microsoft ToDo.

I made an User Control, where the Calender is in.

When i have it in the Design, it looks like this: https://ibb.co/XD0Wyj5

But when i start the Programm, it looks like this: https://ibb.co/vv30xrw

I tried it with

Application.EnableVisualStyles();

but it still looks like this.

What can i do to have the Design in the started Program?

  • Try switching visual styles off: `Application.VisualStyleState = System.Windows.Forms.VisualStyles.VisualStyleState.NoneEnabled;` – Dmitry Bychenko Dec 22 '21 at 12:28
  • 1
    You don't need to disable the visual styles for the whole application, instead, you may want to [disable visual styles for the MonthCalendar control](https://stackoverflow.com/a/54912594/3110834). – Reza Aghaei Dec 22 '21 at 13:24

1 Answers1

0

Check out the VisualStyleState reference - https://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/VisualStyles/VisualStyleState.cs,01ad4fcb5f9ea430,references

The visual styles are not enabled when VisualStyleState.NoneEnabled is assigned to Application.VisualStyleState

Ran Turner
  • 14,906
  • 5
  • 47
  • 53