Turn off visual styles for a single button only

I am developing an application in VB.NET 2005 .EXE Project.

I have XP Visual Styles enabled for the application.

I have created a form, and need to turn off visual styles for a single button only.

I have tried all the Flat Styles.

Any Ideas

Karl

[542 byte] By [KarlGrear] at [2008-1-10]
# 1
You can do it by writing a CSS file....Just make a styleSheet...Add it to the Themes...Then make a class for that button set the properties as how you want the button...then call the class in cssClass. Try it
TapojjwalMandal at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

Thanks for responding Tapojjwal,

I am working in an VB.NET .EXE Project.

Sorry if I was not clear in my post.

Karl
KarlGrear at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Try this:

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.FlatStyle = FlatStyle.System
SetWindowTheme(Button1.Handle, "", "")
End Sub
' P/Invoke declaration
Private Declare Function SetWindowTheme Lib "uxtheme.dll" (ByVal hWnd As IntPtr, Optional ByRef pszSubAppName As String = "", Optional ByRef pszSubIdList As String = "") As Integer
End Class

nobugz at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...