How to set the theme of Listview?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jly
Posts: 89
Joined: 30 Sep 2020, 06:06

How to set the theme of Listview?

15 Apr 2021, 12:07

How to set the theme of Listview?

Execute the following command in powershell, and you will see another style of Listview.
Is it possible to set Listview to that style through AutoHotkey?

Code: Select all

gp 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\*' | select PSChildName, Name | sort Name | out-gridview
Listview_Theme.png
Listview_Theme.png (172.99 KiB) Viewed 183 times

I found a link to set the theme of Listview to Explorer. Can it be set to another theme?
'Explorer' theme for ListViews & TreeViews on Vista+
https://www.autohotkey.com/boards/viewtopic.php?t=8789

Code: Select all

SetExplorerTheme(HCTL) { ; HCTL : handle of a ListView or TreeView control
   If (DllCall("GetVersion", "UChar") > 5) {
      VarSetCapacity(ClassName, 1024, 0)
      If DllCall("GetClassName", "Ptr", HCTL, "Str", ClassName, "Int", 512, "Int")
         If (ClassName = "SysListView32") || (ClassName = "SysTreeView32")
            Return !DllCall("UxTheme.dll\SetWindowTheme", "Ptr", HCTL, "WStr", "Explorer", "Ptr", 0)
   }
   Return False
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, RandomBoy, Rohwedder and 349 guests