<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>DisplayFusion RSS: Issues with ScriptedFunction: Toggle Borders and Caption From Window (+ Fixes)</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e</link>
<description>DisplayFusion RSS: Issues with ScriptedFunction: Toggle Borders and Caption From Window (+ Fixes)</description>
<lastBuildDate>Sat, 18 Apr 2026 05:25:29 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e</generator>
<item>
<title>RE: Issues with ScriptedFunction: Toggle Borders and Caption From Window (+ Fixes)</title>
<link>https://www.displayfusion.com/Discussions/View/issues-with-scriptedfunction-toggle-borders-and-caption-from-window-fixes/?ID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e#2</link>
<pubDate>Mon, 04 Dec 2017 16:52:26 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/issues-with-scriptedfunction-toggle-borders-and-caption-from-window-fixes/?ID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Thanks for the feedback! We'll look into fixing those issues up. In the meantime, I've updated the existing script in the repository with your new code]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks for the feedback! We'll look into fixing those issues up. In the meantime, I've updated the existing script in the repository with your new code <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>Issues with ScriptedFunction: Toggle Borders and Caption From Window (+ Fixes)</title>
<link>https://www.displayfusion.com/Discussions/View/issues-with-scriptedfunction-toggle-borders-and-caption-from-window-fixes/?ID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e</link>
<pubDate>Thu, 30 Nov 2017 00:35:37 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/issues-with-scriptedfunction-toggle-borders-and-caption-from-window-fixes/?ID=1d07fdd3-dbc6-49c9-97cf-c2c620ea006e</guid>
<category>DisplayFusion</category>
<description><![CDATA[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 SetWindowStyle
, instead of after it. However, it seems that a borderless window cannot be r...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Ran into a few issues with this scripted function:<br/>
 <a href="https://www.displayfusion.com/ScriptedFunctions/View/?ID=1d406af3-a3f1-431a-a3d5-45caa41b4c35" target="_blank" rel="nofollow"><b>Toggle Borders and Caption From Window</b></a>.<br/>
<br/>
<b>Issue 1: Inaccurate Window Sizing</b><br/>
<br/>
<div class="Image"><a href="http://i.imgur.com/ZgK0bkY.gif" target="_blank" data-fancybox="" data-caption="http://i.imgur.com/ZgK0bkY.gif" HelpButtonData="http://i.imgur.com/ZgK0bkY.gif" HelpButtonDataAlign="BelowMiddle"><img src="http://i.imgur.com/ZgK0bkY.gif" alt="http://i.imgur.com/ZgK0bkY.gif" title=""></a></div><br/>
<br/>
This issue seems to be caused by calling <div class="Inline"><pre>SetSize/SetSizeAndLocation</pre></div> before <div class="Inline"><pre>SetWindowStyle</pre></div>, instead of after it. However, it seems that a borderless window cannot be resized by <div class="Inline"><pre>SetSize/SetSizeAndLocation</pre></div>. I managed to circumvent this by calling <div class="Inline"><pre>user32.dll/SetWindowPos</pre></div>. Perhaps <div class="Inline"><pre>SetSize/SetSizeAndLocation</pre></div> can be updated so that this workaround becomes unnecessary?<br/>
<br/>
<b>Issue 2: System Window Side Effects</b><br/>
<br/>
<div class="Image"><a href="http://i.imgur.com/fjzle7x.gif" target="_blank" data-fancybox="" data-caption="http://i.imgur.com/fjzle7x.gif" HelpButtonData="http://i.imgur.com/fjzle7x.gif" HelpButtonDataAlign="BelowMiddle"><img src="http://i.imgur.com/fjzle7x.gif" alt="http://i.imgur.com/fjzle7x.gif" title=""></a></div><br/>
<br/>
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.<br/>
<br/>
Here is a <a href="https://gist.github.com/Enteleform/5fee559cbd9fcdeef8b3f5c313b5e1fa" target="_blank" rel="nofollow"><b>Gist</b></a> that contains <div class="Inline"><pre>ToggleBorder</pre></div> & <div class="Inline"><pre>Maximize_RemoveBorder</pre></div> functions with the above fixes implemented.
</div>
]]></content:encoded>
</item>
</channel>
</rss>