Dark theme for 64-bit context menu

Features wanted...
Post Reply
zakoul
Posts: 156
Joined: 11 Dec 2019 10:44

Dark theme for 64-bit context menu

Post by zakoul »

Hello. Is there a dark theme planned for the 64-bit context menu?
Windows 11 25H2, 100%

Horst
Posts: 1374
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Dark theme for 64-bit context menu

Post by Horst »

Its an Autohotkey script.
The following contains some interesting code examples.
May be Don can have a look.
https://www.autohotkey.com/boards/viewtopic.php?t=94661
Windows 11 Home, Version 25H2 (OS Build 26200.8457)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1412b (x64), Everything Toolbar 2.3.0, Listary Pro 6.3.6.99

zakoul
Posts: 156
Joined: 11 Dec 2019 10:44

Re: Dark theme for 64-bit context menu

Post by zakoul »

The developer is not interested in this topic? Not worth waiting for ?
Windows 11 25H2, 100%

Norn
Posts: 504
Joined: 24 Oct 2021 16:10

Re: Dark theme for 64-bit context menu

Post by Norn »

Horst wrote: 19 Mar 2022 12:31 Its an Autohotkey script.
The following contains some interesting code examples.
May be Don can have a look.
https://www.autohotkey.com/boards/viewtopic.php?t=94661
I copied the AHK v1.1 sample code and used it in the AHK v2 script, if it works for the shell menu we can get the dark theme for 64-bit context menu. :)

Code: Select all

xyPath  := "D:\XYplorer\XYplorer.exe"

;==================================================================================================
; Dark theme
;==================================================================================================

; Dark mode (Required Windows 10 version)
uxtheme := DllCall("GetModuleHandle", "str", "uxtheme", "ptr")
SetPreferredAppMode := DllCall("GetProcAddress", "ptr", uxtheme, "ptr", 135, "ptr")
FlushMenuThemes := DllCall("GetProcAddress", "ptr", uxtheme, "ptr", 136, "ptr")
DllCall(SetPreferredAppMode, "int", 1) ; Dark
DllCall(FlushMenuThemes)

; Switch from dark to not dark
/*
DllCall(SetPreferredAppMode, "int", 0) ; NOT Dark
DllCall(FlushMenuThemes)
*/



;==================================================================================================
; Create a popup menu
;==================================================================================================

; Create main menu
 MyMenu := Menu()
 MyMenu.Name := "Main menu"                                   ; Used to show which menu is selected

;  Add menu item
 MyMenu.Add "Item 1", MenuHandler

 if FileExist(xyPath)
    MyMenu.SetIcon("Item 1", xyPath)                          ; Add icon to first menu item if icon file exists

 MyMenu.Add "Item 2", MenuHandler                             ; Add a second menu item
 MyMenu.Add                                                   ; Add a separator line


; Add submenu
 Submenu1 := Menu()
 Submenu1.Name := "Submenu1"                              ; Used to show which menu is selected
; Add items to submenu
 Submenu1.Add "Submenu item 1", MenuHandler
 Submenu1.Add "Submenu item 2", MenuHandler
; Create a submenu in the main menu
 MyMenu.Add "Submenu1", Submenu1


 MyMenu.Add                                               ; Add a separator line
 MyMenu.Add "Item 3", MenuHandler                         ; Add a third menu item

 MyMenu.Default := "Item 1"

MenuHandler(Item, ItemPos, MyMenu) {
	MsgBox "You selected " Item " (position " ItemPos " in " MyMenu.Name ")"
}



MyMenu.Show
Windows 11 24H2 @100% 2560x1440

Post Reply