<?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: Move windows to monitor #X - Monitor IDs change</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=0191fb46-197a-7348-abae-9bfcd24bfc18" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=0191fb46-197a-7348-abae-9bfcd24bfc18</link>
<description>DisplayFusion RSS: Move windows to monitor #X - Monitor IDs change</description>
<lastBuildDate>Wed, 08 Apr 2026 00:26:28 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=0191fb46-197a-7348-abae-9bfcd24bfc18</generator>
<item>
<title>RE: Move windows to monitor #X - Monitor IDs change</title>
<link>https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#4</link>
<pubDate>Tue, 24 Sep 2024 21:34:37 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[This seems to work fine. I obviously know the resolutions of my monitors so this should be finding the monitor containing these XY coordinates, which should be the second from the left.
Code
Copy
Select All
using System;
using System.Drawing;
public static class DisplayFusionFunction
{
pu...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
This seems to work fine. I obviously know the resolutions of my monitors so this should be finding the monitor containing these XY coordinates, which should be the second from the left.<br/>
<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="#code019d6a7bc0eb76d6974cf9fb291b6160" 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('code019d6a7bc0eb76d6974cf9fb291b6160Js'); 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="code019d6a7bc0eb76d6974cf9fb291b6160Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Set the Monitor ID you want to move the windows from
        // uint monitorID = BFS.Monitor.GetMonitorIDs()[1];
        uint monitorID = BFS.Monitor.GetMonitorIDByXY(4300, 300);

        // Loop through the visible windows on the monitor and move them to the monitor that has the mouse cursor
        foreach (IntPtr window in BFS.Window.GetVisibleWindowHandlesByMonitor(monitorID))
        {
            BFS.DisplayFusion.RunFunctionWithWindowHandle("Move Window to Next Monitor", window);
        }   
    }
}</pre><textarea id="code019d6a7bc0eb76d6974cf9fb291b6160" name="code019d6a7bc0eb76d6974cf9fb291b6160" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
<media:thumbnail url="https://www.displayfusion.com/Discussions/Download/?ID=0191fbad-23cf-70d9-8730-3f1cd90b7f15"/>
</item>
<item>
<title>RE: Move windows to monitor #X - Monitor IDs change</title>
<link>https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#3</link>
<pubDate>Wed, 18 Sep 2024 15:47:42 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[This didn't seem to work.  My monitors are 2-4-3 right now with the middle one being the one I'm looking for.  I put this line in my code instead of the original "uint monitorID = 2" and it moved everything from the right monitor to the middle...
Quote:
Hi Chris,
If the ID you want is always t...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
This didn't seem to work.  My monitors are 2-4-3 right now with the middle one being the one I'm looking for.  I put this line in my code instead of the original "uint monitorID = 2" and it moved everything from the right monitor to the middle...<br/>
<br/>
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>Hi Chris,<br/>
<br/>
If the ID you want is always the middle monitor, BFS.Monitors.GetMonitorIDs should get them in order from left to right, so something like this should work:<br/>
<br/>
<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="#code019d6a7bc0f770a6be955c92a4762fc9" 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('code019d6a7bc0f770a6be955c92a4762fc9Js'); 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="code019d6a7bc0f770a6be955c92a4762fc9Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">uint monitorID = BFS.Monitor.GetMonitorIDs()[1]</pre><textarea id="code019d6a7bc0f770a6be955c92a4762fc9" name="code019d6a7bc0f770a6be955c92a4762fc9" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
The [1] index will get the second one one in the array (which should be the middle monitor)<br/>
<br/>
Hope that helps!</div></div>
</div>
]]></content:encoded>
<media:thumbnail url="https://www.displayfusion.com/Discussions/Download/?ID=0191fbad-23cf-70d9-8730-3f1cd90b7f15"/>
</item>
<item>
<title>RE: Move windows to monitor #X - Monitor IDs change</title>
<link>https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#2</link>
<pubDate>Wed, 18 Sep 2024 12:41:35 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi Chris,
If the ID you want is always the middle monitor, BFS.Monitors.GetMonitorIDs should get them in order from left to right, so something like this should work:
Code
Copy
Select All
uint monitorID = BFS.Monitor.GetMonitorIDs()[1]
The [1] index will get the second one one in the array ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi Chris,<br/>
<br/>
If the ID you want is always the middle monitor, BFS.Monitors.GetMonitorIDs should get them in order from left to right, so something like this should work:<br/>
<br/>
<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="#code019d6a7bc0ff73a58baa715b42139201" 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('code019d6a7bc0ff73a58baa715b42139201Js'); 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="code019d6a7bc0ff73a58baa715b42139201Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">uint monitorID = BFS.Monitor.GetMonitorIDs()[1]</pre><textarea id="code019d6a7bc0ff73a58baa715b42139201" name="code019d6a7bc0ff73a58baa715b42139201" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
The [1] index will get the second one one in the array (which should be the middle monitor)<br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
<media:thumbnail url="https://www.displayfusion.com/Discussions/Download/?ID=0191fbad-23cf-70d9-8730-3f1cd90b7f15"/>
</item>
<item>
<title>Move windows to monitor #X - Monitor IDs change</title>
<link>https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18</link>
<pubDate>Mon, 16 Sep 2024 14:39:21 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/move-windows-to-monitor-x-monitor-ids-change/?ID=0191fb46-197a-7348-abae-9bfcd24bfc18</guid>
<category>DisplayFusion</category>
<description><![CDATA[I have a 3 monitor set up as you can see in the screenshot.  I have 2 normal monitors on the left and right, and a Cisco Desk Pro in the middle.  This is a video unit that I use for calls.  When I start a call, the desktop goes into the background and I have to make some swipes to get backt to th...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I have a 3 monitor set up as you can see in the screenshot.  I have 2 normal monitors on the left and right, and a Cisco Desk Pro in the middle.  This is a video unit that I use for calls.  When I start a call, the desktop goes into the background and I have to make some swipes to get backt to that screen.  Kind of annoying.  The other thing that happens and never seems to fail is when I open a new window of anything, it opens on that monitor.<br/>
<br/>
I tried setting up a function to move all windows on a monitor to the next one.  It works GREAT.  However, occasionally the monitor numbers will change and #2 becomes #3, etc.  In the screenshot, you can see that my code is now wrong and should be #2 instead of #4.  This also happens a lot when I undock/redock.<br/>
<br/>
Is there any way to get the monitor ID based on the location, monitor name, etc?  Anything to always select the same monitor and not care about the number?  Or a better way to accomplish this?
</div>
]]></content:encoded>
<media:thumbnail url="https://www.displayfusion.com/Discussions/Download/?ID=0191fbad-23cf-70d9-8730-3f1cd90b7f15"/>
</item>
</channel>
</rss>