Ran into a few issues with this scripted function:
Toggle Borders and Caption From Window.
Issue 1: Inaccurate Window Sizing
This issue seems to be caused by calling
SetSize/SetSizeAndLocation
before
, instead of after it. However, it seems that a borderless window cannot be resized by
SetSize/SetSizeAndLocation
. I managed to circumvent this by calling
. Perhaps
SetSize/SetSizeAndLocation
can be updated so that this workaround becomes unnecessary?
Issue 2: System Window Side Effects
This issue can mangle the Windows Shell & render it unusable. It is easily fixed by implementing a list of window classes that should always be ignored, as well as a list of window classes that should not have alternate styles applied. IMO these would be better situated as global settings, so that users can define said window class exclusions once & reuse them throughout their scripts.
Here is a
Gist that contains
&
functions with the above fixes implemented.