<?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: Script Function -Determine Monitor Bounds when Cascading Lots of Windows</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=01939823-b929-770b-a8e0-d77f78637595" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=01939823-b929-770b-a8e0-d77f78637595</link>
<description>DisplayFusion RSS: Script Function -Determine Monitor Bounds when Cascading Lots of Windows</description>
<lastBuildDate>Wed, 08 Apr 2026 07:52:23 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=01939823-b929-770b-a8e0-d77f78637595</generator>
<item>
<title>RE: Script Function -Determine Monitor Bounds when Cascading Lots of Windows</title>
<link>https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595#3</link>
<pubDate>Sat, 25 Jan 2025 22:33:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Oh cool -thank you very much. I know this is a late reply... I know I came back here many times look for replies, but never saw any to any of my posts ...and now I am seeing them ...go figure.
Anymonday, thanks very much for your help. This should fit with what I was looking for!
R Twohawks
Up...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Oh cool -thank you very much. I know this is a late reply... I know I came back here many times look for replies, but never saw any to any of my posts ...and now I am seeing them ...go figure.<br/>
<br/>
Anymonday, thanks very much for your help. This should fit with what I was looking for!<br/>
R Twohawks<br/>
<br/>
Update: This did the trick - thanks very much Thomas!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script Function -Determine Monitor Bounds when Cascading Lots of Windows</title>
<link>https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595#2</link>
<pubDate>Tue, 10 Dec 2024 17:00:33 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Here's some code that will check if a window is overlapping a monitor edge. Since you're already setting the position of the windows and know what monitor you want to have them on, you can probably skip getting the window bounds and monitor bounds and use the values that you're already using in y...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Here's some code that will check if a window is overlapping a monitor edge. Since you're already setting the position of the windows and know what monitor you want to have them on, you can probably skip getting the window bounds and monitor bounds and use the values that you're already using in your script.

<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019d6c1400ec74eab0713d712335aea0" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019d6c1400ec74eab0713d712335aea0Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019d6c1400ec74eab0713d712335aea0Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">// Get the position and size of a window
Rectangle windowBounds = BFS.Window.GetBounds(windowHandle);

// Get the position and size of the current monitor
Rectangle monitorBounds = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);

// Check the window's position
if(monitorBounds.Left &gt;= windowBounds.Left) 
{
    // The left side of the window is touching or overlapping the monitor's left edge
}

if(monitorBounds.Right &lt;= windowBounds.Right) 
{            
    // The right side of the window is touching or overlapping the monitor's right edge    
}

if(monitorBounds.Top &gt;= windowBounds.Top)
{
    // The top of the window is touching or overlapping the monitor's top edge
}

if(monitorBounds.Bottom &lt;= windowBounds.Bottom)
{            
    // The bottom of the window is touching of overlapping the monitor's bottom edge    
}</pre><textarea id="code019d6c1400ec74eab0713d712335aea0" name="code019d6c1400ec74eab0713d712335aea0" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>

I hope this helps!
</div>
]]></content:encoded>
</item>
<item>
<title>Script Function -Determine Monitor Bounds when Cascading Lots of Windows</title>
<link>https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595</link>
<pubDate>Thu, 05 Dec 2024 18:44:58 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-function-determine-monitor-bounds-when-cascading-lots-of-windows/?ID=01939823-b929-770b-a8e0-d77f78637595</guid>
<category>DisplayFusion</category>
<description><![CDATA[I am looking for some pointers/tips for BFS (C# script) commands to explore for determining the right and bottom edges of a monitor when executing some "cascade windows" commands.
Without getting into too many details, essentially I may wish to resize and then cascade "too many" windows at a tim...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I am looking for some pointers/tips for BFS (C# script) commands to explore for determining the right and bottom edges of a monitor when executing some "cascade windows" commands.<br/>
<br/>
Without getting into too many details, essentially I may wish to resize and then cascade "too many" windows at a time ...running out of room, they will just "keep going" off screen.<br/>
<br/>
The gist: I target a specified application set of windows, for instance Mozilla Firefox, on a specified monitor, iterate and set size and location for each one in turn.<br/>
Currently I set a limit on the number of windows so it doesn't get out of hand. <br/>
<br/>
---<br/>
I am wondering if someone can recommend some BFS commands to explore that will help indicate the Right and Bottom Screen Edges of a targetted monitor ...specifically when a left or right window edge touches or overlaps that screen edge after moving a window, so I can then set some other action.<br/>
<br/>
Any help would be appreciated.<br/>
I am running Windows 7 with DF Version 9.9 ...so I do have some code limitations. That said, any pointers you may have, regardless of newer platform, would be helpful.<br/>
<br/>
Thank you.<br/>
Twohawks
</div>
]]></content:encoded>
</item>
</channel>
</rss>