5

I am updating a Visual Basic Windows Forms application that was written for Windows XP.

What form property do I set to tell a windows form to accept the default Windows 8 / 10 flat theme? Is it a global setting per application or a per-form setting?

The main form and some child forms of my application look fine with modification.

enter image description here

However, some of my child forms still have Windows XP/7's textured look:

enter image description here

I read some posts that point to "EnableVisualStyles = true". However that question was asking how to get the Windows XP styles, rather than Win 95/95 styles. I need some clarification on what the setting should be for newer Win 8 / 10 theme.

Community
  • 1
  • 1
Dan Sorensen
  • 11,403
  • 19
  • 67
  • 100
  • 1
    Is that an MDI Child? I don't think MDI child forms got any Microsoft love. – LarsTech Oct 09 '14 at 19:16
  • 1
    Wow, good catch. Yes, the one that fails is an MDI Child, whereas the one that works is not a child. – Dan Sorensen Oct 09 '14 at 19:34
  • 1
    LarsTech: I just commented out Me.MdiParent = mdiMain on that form and tested and indeed that was the issue. Even though it is not what I wanted to hear, it answered my question. If you post as a real answer, I'll mark you as correct. – Dan Sorensen Oct 09 '14 at 19:42

1 Answers1

2

MDI Child forms are a special type of form that is not considered a TopLevel form, and windows themes only affect TopLevel forms.

Microsoft has been deprecating the use of Multiple Document Interfaces (MDI didn't even get written into WPF) in favor of Tabbed interfaces.

LarsTech
  • 80,625
  • 14
  • 153
  • 225