cyberyeye Posted January 20 Posted January 20 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 January 20 Author Posted January 20 If I remove style: $CBS_DROPDOWNLIST there is not anymore these visual rendering/artefact problem.
Solution cyberyeye Posted January 20 Author Solution Posted January 20 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 January 20 Posted January 20 @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
Developers Jos Posted January 20 Developers Posted January 20 2 hours ago, cyberyeye said: Maybe @Jos could check if there is a problem introduce by Windows 11 Highly doubt he's able/capable, and guess you mean somebody else! 😉 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
argumentum Posted January 20 Posted January 20 4 hours ago, cyberyeye said: 1 hour ago, Nine said: it seems that your overall choice of theme in Windows 11 is interfering with AutoIt (just a guess though). I too believe that you're using a theme that is not shipped with Windows 11. I use them all the time. But in any case, is a win32control and AutoIt just loads it. Not an AutoIt specific problem from my train of thought. Check for file corruption in your PC ? Other than that, I have no idea. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
cyberyeye Posted January 22 Author Posted January 22 (edited) I have reinstalled from scratch (clean install) Windows 11 (24h2 ltsc) and it works now perfectly ! In my previous win11 installation no doubt I most probably uninstalled a components such as "Get Help" or "Feedback" (or another one of this kind of categorie) wich was providing some api and then I had this visual artefact problem. Now it works like a charm : sorry for having asked such a dumb question😅and thanks to all for your answer 👍 Edit: before doing a clean install i have tested using dism (restore health) and sfc : both showed no errors ! Also I was using (and i am still using) original Dark theme from OS. Edited January 22 by cyberyeye argumentum 1
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