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

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

  • Comments 6

     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.

Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post
Page 1 of 1 (6 items)