<?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: How can I make my window-mirror scripted function re-select the source window?</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=4f4bd591-310e-4481-95e3-41ada284f3a7" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=4f4bd591-310e-4481-95e3-41ada284f3a7</link>
<description>DisplayFusion RSS: How can I make my window-mirror scripted function re-select the source window?</description>
<lastBuildDate>Sat, 20 Jun 2026 04:31:25 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=4f4bd591-310e-4481-95e3-41ada284f3a7</generator>
<item>
<title>RE: How can I make my window-mirror scripted function re-select the source window?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#4</link>
<pubDate>Tue, 24 Nov 2020 20:53:12 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi Steve,
Not a problem, if you have any other questions, feel free to reach out to us.
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi Steve,<br/>
<br/>
Not a problem, if you have any other questions, feel free to reach out to us.<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I make my window-mirror scripted function re-select the source window?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#3</link>
<pubDate>Tue, 24 Nov 2020 18:38:04 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Works Perfect!
Thanks very much.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Works Perfect!<br/>
Thanks very much.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I make my window-mirror scripted function re-select the source window?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#2</link>
<pubDate>Tue, 24 Nov 2020 14:30:17 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi Steve,
If you put this line below it should refocus the last
window: BFS.Window.Focus(windowHandle);
Hope that helps!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi Steve,<br/>
<br/>
If you put this line below it should refocus the last <br/>
window: BFS.Window.Focus(windowHandle); <br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>How can I make my window-mirror scripted function re-select the source window?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7</link>
<pubDate>Sun, 22 Nov 2020 13:33:15 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-make-my-window-mirror-scripted-function-re-select-the-source-window/?ID=4f4bd591-310e-4481-95e3-41ada284f3a7</guid>
<category>DisplayFusion</category>
<description><![CDATA[I've downloaded a scripted function to mirror a source window to a specific monitor.
I use it to mirror VLC media player.
At the moment, the mirror window is "active" after the script runs, so my keyboard doesn't control VLC until re-select VLC
I would like to automatically re-select the windo...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I've downloaded a scripted function to mirror a source window to a specific monitor.<br/>
<br/>
I use it to mirror VLC media player.<br/>
<br/>
At the moment, the mirror window is "active" after the script runs, so my keyboard doesn't control VLC until re-select VLC<br/>
<br/>
I would like to automatically re-select the window that was active when I ran the scripted function.<br/>
<br/>
Thanks!!<br/>
<br/>
<i>This is the script I use</i><br/>
<br/>
<div class="Inline"><pre>using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Trigger target when run by a Trigger rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Mirror the window and move it        
        IntPtr mirrorWindow = BFS.DisplayFusion.MirrorWindowNoBorder(windowHandle);
        BFS.Window.MoveToMonitorMaximized(5, mirrorWindow);
        
        
                
    }
}</pre></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>