Aether Posted February 2, 2020 Posted February 2, 2020 Is it simply possible to have the Dark Mode enable on a GUI ? #include <ColorConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPITheme.au3> #include <Array.au3> Example() Func Example() Local $hGUI = GUICreate("Example", 300, 200) $sTheme = "DarkMode_Explorer" ;Local $tString = DllStructCreate ("char[" & StringLen ($sTheme) & "]") ;DllStructSetData ($tString, 1, $sTheme) ; Local $aRet = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hGUI, "ptr", DllStructGetPtr($tString), "ptr", Null) ;_ArrayDisplay ($aRet) ;$hCheckbox = GUICtrlCreateCheckbox("Text with colour change", 10, 10, 150, 20) ; GUICtrlSetColor($hCheckbox, $COLOR_RED) Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25) ConsoleWrite(_WinAPI_SetWindowTheme($hGUI, $sTheme) & @CRLF) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idButton_Close ExitLoop EndSwitch WEnd EndFunc ;==>Example
Ontosy Posted March 30, 2023 Posted March 30, 2023 Is it simply possible to have the Dark Mode enable on a GUI ?
argumentum Posted April 2, 2023 Posted April 2, 2023 Search on line. Good luck Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Mobius Posted April 2, 2023 Posted April 2, 2023 (edited) I doubt the op is still looking for a solution 3 years later guys. But you never know. Edited April 2, 2023 by Mobius argumentum 1
argumentum Posted April 3, 2023 Posted April 3, 2023 ... @Ontosy bumped the question and I gave an answer. If @Aether ever comes back, well, there's an answer Mobius 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now