I have a winforms application. Main form has some buttons that open other forms on click.
There is a form I would like to disable visual styles/theme. Also I would like to disable visual styles for its childs. Is it possible? If so how?
For example, suppose I have three buttons on main form:
Button1opensform1on clickButton2opensform2on clickButton3opensform3on click
so when I click Button2 I would like to only disable visual styles on it but I would like to keep visual styles enabled for forms: form1 and form3.
You can do this with PInvoke SetWindowTheme:
Then for example in your
button2event handler: