<?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: [SOLVED] How to move all windows from a process in scripted function?</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=7f70a5f7-0626-4051-803d-52af9b1089c1" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=7f70a5f7-0626-4051-803d-52af9b1089c1</link>
<description>DisplayFusion RSS: [SOLVED] How to move all windows from a process in scripted function?</description>
<lastBuildDate>Wed, 08 Apr 2026 04:50:12 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=7f70a5f7-0626-4051-803d-52af9b1089c1</generator>
<item>
<title>RE: [SOLVED] How to move all windows from a process in scripted function?</title>
<link>https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1#3</link>
<pubDate>Wed, 02 Aug 2017 17:28:19 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[That works great, thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That works great, thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: [SOLVED] How to move all windows from a process in scripted function?</title>
<link>https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1#2</link>
<pubDate>Tue, 01 Aug 2017 18:01:38 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Try this out
Code
Copy
Select All
using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Set the monitor number
uint rightMonNumber = 401;
// Get all window handles
IntPtr[] windows = BFS.Window.GetAllWindowHan...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Try this out <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" /><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="#code019d6b6d350874dcb8f03bffe0c329bf" 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('code019d6b6d350874dcb8f03bffe0c329bfJs'); 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="code019d6b6d350874dcb8f03bffe0c329bfJs" 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 number
        uint rightMonNumber = 401;

// Get all window handles
IntPtr[] windows = BFS.Window.GetAllWindowHandles();

// Loop through the window handles and move any that belong to chrome.exe
foreach (IntPtr window in windows)
{
            if (BFS.Application.GetMainFileByWindow(window).Contains("chrome.exe"))
                BFS.Window.MoveToMonitor(rightMonNumber, window);

}
}
}</pre><textarea id="code019d6b6d350874dcb8f03bffe0c329bf" name="code019d6b6d350874dcb8f03bffe0c329bf" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>[SOLVED] How to move all windows from a process in scripted function?</title>
<link>https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1</link>
<pubDate>Mon, 31 Jul 2017 14:35:44 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/solved-how-to-move-all-windows-from-a-process-in-scripted-function/?ID=7f70a5f7-0626-4051-803d-52af9b1089c1</guid>
<category>DisplayFusion</category>
<description><![CDATA[Using a scripted function, I'm trying to move all windows from chrome to a specific monitor.
This works great for moving a single window, but if I have multiple windows open, only one is moved.  Is there a function that will grab *all* matching windows instead of just main?
Code
Copy
Select A...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Using a scripted function, I'm trying to move all windows from chrome to a specific monitor.<br/>
<br/>
This works great for moving a single window, but if I have multiple windows open, only one is moved.  Is there a function that will grab *all* matching windows instead of just main?<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="#code019d6b6d351276f99a9828229053e439" 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('code019d6b6d351276f99a9828229053e439Js'); 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="code019d6b6d351276f99a9828229053e439Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">//get the window handle of a specific application
            IntPtr chrome = BFS.Application.GetMainWindowByFile("*chrome.exe");
            //if we couldn't get the skype window, exit the function
            if (chrome != IntPtr.Zero) {
                //move the window
                BFS.Window.MoveToMonitor(rightMonNumber, chrome);

            }</pre><textarea id="code019d6b6d351276f99a9828229053e439" name="code019d6b6d351276f99a9828229053e439" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>