Hide the dotted focus border

Put simple Tips and Tricks that are not entire Tutorials in this forum
just me
Posts: 5458
Joined: 02 Oct 2013, 08:51
Location: Germany

Hide the dotted focus border

23 Oct 2015, 01:43

Because of this question I tried tmplinshi's function. But it didn't work as I want, so I changed it. This version seems to work and - according to the MSDN - should work for all Windows versions >= Win 2000. I tested on Win 10 only.

As a result of my test you have to call the function once for each GUI control / GUI after it has been shown.

Code: [Select all] [Expand] [Download] (HideFocusBorder.ahk)GeSHi © Codebox Plus



tmplinshi had already noticed some issues caused by the Alt key. On my system WM_UPDATEUISTATE messages with wParam = 0x00030002 (UIS_INITIALIZE | UISF_HIDEACCEL) are sent/posted to the controls. Although wParam does not contain the UISF_HIDEFOCUS flag, it will be cleared when the message is processed. That's why the message handler for WM_UPDATEUISTATE messages is needed.
User avatar
joedf
Posts: 6434
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: Hide the dotted focus border

23 Oct 2015, 17:14

hmm... cool :+1:
Coco-guest

Re: Hide the dotted focus border

23 Oct 2015, 22:10

AutoIt solution I once found way back. It is somehow more complicated(involves subclassing, etc.) compared to your method.
User avatar
Exaskryz
Posts: 2873
Joined: 17 Oct 2015, 20:28

Re: Hide the dotted focus border

09 Dec 2015, 14:19

Just wanted to say that it works on 8.1 and I appreciate you sharing this code. Worked great to hide the border on a Slider control.

Return to “Tips and Tricks”

Who is online

Users browsing this forum: Gio and 0 guests