@msdn=https://docs.microsoft.com/en-us/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme @pinvoke=http://pinvoke.net/$$$.htm Summary: TODO - a short description !!!!C# Signature: [DllImport("uxtheme.dll", SetLastError=true, ExactSpelling=true, CharSet=CharSet.Unicode)] public static extern int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList); !!!!VB.NET Signature: Public Declare Auto Function SetWindowTheme Lib "uxtheme.dll" (hWnd As IntPtr, pszSubAppName As String, pszSubIdList As String) As Integer !!!!User-Defined Types: !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: Returns HRESULT. !!!!Tips & Tricks: Please add some! !!!!Sample Code for VB.NET: 'These classes enable visual styles for ListView and TreeView controls 'This method works for vista and above Module WinApi Public Declare Auto Function SetWindowTheme Lib "uxtheme.dll" (hWnd As IntPtr, pszSubAppName As String, pszSubIdList As String) As Integer End Module Public Class TreeView Inherits System.Windows.Forms.TreeView Protected Overrides Sub OnHandleCreated(e As EventArgs) MyBase.OnHandleCreated(e) If Not DesignMode AndAlso Environment.OSVersion.Platform = PlatformID.Win32NT AndAlso Environment.OSVersion.Version.Major >= 6 Then SetWindowTheme(Me.Handle, "explorer", Nothing) End If End Sub End Class Public Class ListView Inherits System.Windows.Forms.ListView Protected Overrides Sub OnHandleCreated(e As EventArgs) MyBase.OnHandleCreated(e) If Not DesignMode AndAlso Environment.OSVersion.Platform = PlatformID.Win32NT AndAlso Environment.OSVersion.Version.Major >= 6 Then SetWindowTheme(Me.Handle, "explorer", Nothing) End If End Sub End Class Documentation: SetWindowThemeAttribute@msdn on MSDN http://msdn.microsoft.com/en-us/library/bb759829(VS.85).aspx
Edit uxtheme.SetWindow...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.