This method maps to the Windows API function DrawFocusRect
. The documentation for which says:
Windows XP: The focus rectangle can now be thicker than 1 pixel, so it is more visible for high-resolution, high-density displays and accessibility needs. This is handled by the
SPI_SETFOCUSBORDERWIDTH
andSPI_SETFOCUSBORDERHEIGHT
inSystemParametersInfo
.
So you can indeed control the width. However, the modification you make applies to all programs on the current desktop. Which I am pretty sure is not what you desire. So my recommendation is that you do not use DrawFocusRect
and instead draw this rectangle manually. It is very easy to do. It is just alternating black and white pixels and can be draw efficiently with BitBlt
. And quite possibly other simpler ways.