Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does my Windows Form project not use visual styles in XP even when I call Application.EnableVisualStyles?

0
Posted

Why does my Windows Form project not use visual styles in XP even when I call Application.EnableVisualStyles?

0

If you set a property on a Windows Forms control which forces the creation of the control (e.g. the SelectedIndex property on the ComboBox class), the control (and perhaps the rest of the form) will not render with visual styles enabled. The resolution is to place the code that sets these properties in an event handler for the Load event on the form/control.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123