cyberyeye Posted 3 hours ago Posted 3 hours ago Hi there ! I'm using Windows 24h2 (dark mode) using latest AutoIT stable version (v3.3.18.0) Here's a minimal GUI done quickly using Koda to demonstrate the rendering problem when using any combobox with style : $CBS_DROPDOWNLIST. The combo appears visually corrupted as shown on the two screen capture : is there another recommended style or know workaround to fix this and having combobox "read‑only" without these visual rendering problem ? #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Gui = GUICreate("Form1", 615, 143, 192, 124) $Combo1 = GUICtrlCreateCombo("", 247, 16, 145, 25, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "Item 1|Item 2|Item 3") $Label1 = GUICtrlCreateLabel("Gui Test using Koda", 16, 16, 100, 17) $Button1 = GUICtrlCreateButton("Exit", 263, 80, 89, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE,$Button1 GUIDelete($Gui) Exit EndSwitch WEnd
cyberyeye Posted 3 hours ago Author Posted 3 hours ago If I remove style: $CBS_DROPDOWNLIST there is not anymore these visual rendering/artefact problem.
Solution cyberyeye Posted 1 hour ago Author Solution Posted 1 hour ago Finally I found a kind of "workaround" from an old script wrote near 10 years ago 😄 adding : DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Combo1), "wstr", 0, "wstr", 0) to set/force a classic style to the combo = fix this visual glitches for combo when using $CBS_DROPDOWNLIST #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Gui = GUICreate("Form1", 615, 143) $Combo1 = GUICtrlCreateCombo("Item 1", 247, 16, 145, 25, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "Item 1|Item 2|Item 3") ; apply classic style to combo <= the fix DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Combo1), "wstr", 0, "wstr", 0) $Label1 = GUICtrlCreateLabel("Gui Test using Koda", 16, 16, 100, 17) $Button1 = GUICtrlCreateButton("Exit", 263, 80, 89, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE,$Button1 GUIDelete($Gui) Exit EndSwitch WEnd Clearly this is *not* a real solution but at least this "workaround" fixed my problem 👍 Maybe @Jos could check if there is a problem introduce by Windows 11 when using : GUICtrlCreateCombo + $CBS_DROPDOWNLIST ? Probably another Miscrosoft insanity.
Nine Posted 33 minutes ago Posted 33 minutes ago @cyberyeye FYI, I do not get your glitch when running your first script. So it seems that your overall choice of theme in Windows 11 is interfering with AutoIt (just a guess though). “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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