<?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: Linking two windows together</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=27087091-dd63-4fdb-82c5-e0b0c4c0f665" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=27087091-dd63-4fdb-82c5-e0b0c4c0f665</link>
<description>DisplayFusion RSS: Linking two windows together</description>
<lastBuildDate>Mon, 28 Sep 2026 16:43:27 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=27087091-dd63-4fdb-82c5-e0b0c4c0f665</generator>
<item>
<title>RE: Linking two windows together</title>
<link>https://www.displayfusion.com/Discussions/View/linking-two-windows-together/?ID=27087091-dd63-4fdb-82c5-e0b0c4c0f665#2</link>
<pubDate>Tue, 11 Feb 2020 14:46:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/linking-two-windows-together/?ID=27087091-dd63-4fdb-82c5-e0b0c4c0f665#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[I can't think of a good way to automate that either. I would probably just write a Scripted Function that focuses both windows, assign a key combination to it, and run it manually when you want to switch to Chrome.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I can't think of a good way to automate that either. I would probably just write a Scripted Function that focuses both windows, assign a key combination to it, and run it manually when you want to switch to Chrome.
</div>
]]></content:encoded>
</item>
<item>
<title>Linking two windows together</title>
<link>https://www.displayfusion.com/Discussions/View/linking-two-windows-together/?ID=27087091-dd63-4fdb-82c5-e0b0c4c0f665</link>
<pubDate>Mon, 10 Feb 2020 22:44:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/linking-two-windows-together/?ID=27087091-dd63-4fdb-82c5-e0b0c4c0f665</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm trying to link two Chrome browser windows together so that when the first window gets focus, thw second window also becomes visible. The reasoning is this; window #2 is a tab manager that is "docked" and contains a list of all my open tabs. It's quite nice and really fast but the problem with...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm trying to link two Chrome browser windows together so that when the first window gets focus, thw second window also becomes visible. The reasoning is this; window #2 is a tab manager that is "docked" and contains a list of all my open tabs. It's quite nice and really fast but the problem with it not becoming visible when window #1 does is really irritating. <br/>
<br/>
I've managed to get it to work rather clumsily a couple of times but approchaes have their own drawbacks. One approach is to use a trigger for window #1 and then run a function that gets window #2, changes the focus to window @ which causes it to come to the foreground, then I set the focus back to windows #1. Only one small problem; it's basically in a loop because of the trigger. <br/>
<br/>
The second approach is pretty close to the same except instead of setting the focus to window #2, I do a hide and then a show of window #2. That stops the loop but now the window "flashes". Any suggestions on how to accomplish this? My code is shown below.<br/>
<br/>
Approach 1:<br/>
<div 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="#code01a0e8e662927775ab547140827b43ed" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code01a0e8e662927775ab547140827b43edJs'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;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="code01a0e8e662927775ab547140827b43edJs" name="code01a0e8e662927775ab547140827b43edJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">using System;&#xA;using System.Drawing;&#xA;using System.Runtime.InteropServices;&#xA;&#xA;public static class DisplayFusionFunction&#xA;{&#xA;    private enum ShowWindowEnum : uint&#xA;    {&#xA;        SW_HIDE = 0,&#xA;        SW_SHOWNORMAL = 1,&#xA;        SW_NORMAL = 1,&#xA;        SW_SHOWMINIMIZED = 2,&#xA;        SW_SHOWMAXIMIZED = 3,&#xA;        SW_MAXIMIZE = 3,&#xA;        SW_SHOWNOACTIVATE = 4,&#xA;        SW_SHOW = 5,&#xA;        SW_MINIMIZE = 6,&#xA;        SW_SHOWMINNOACTIVE = 7,&#xA;        SW_SHOWNA = 8,&#xA;        SW_RESTORE = 9,&#xA;        SW_SHOWDEFAULT = 10,&#xA;        SW_FORCEMINIMIZE = 11,&#xA;        SW_MAX = 11,&#xA;    }&#xA;&#xA;    [DllImport(&quot;User32.dll&quot;)]&#xA;    [return: MarshalAs(UnmanagedType.Bool)]&#xA;    private static extern bool ShowWindow(IntPtr hWnd, ShowWindowEnum nCmdShow);&#xA;        &#xA;    public static void Run(IntPtr windowHandle)&#xA;    {&#xA;        IntPtr hwnd = BFS.Window.GetWindowByText(&quot;Tabman&quot;);&#xA;        &#xA;        if ((ulong)hwnd &amp;gt; 0) &#xA;        {&#xA;            if (BFS.Window.IsMinimized(hwnd))&#xA;            {&#xA;                BFS.Window.Restore(hwnd);&#xA;            }&#xA;            else // maybe an if goes here?&#xA;            {&#xA;                // Hide the window&#xA;                ShowWindow(hwnd, ShowWindowEnum.SW_HIDE);&#xA;                &#xA;                // Wait .10 seconds&#xA;                BFS.General.ThreadWait(100);&#xA;                &#xA;                // Show the window&#xA;                ShowWindow(hwnd, ShowWindowEnum.SW_SHOW);&#xA;            }&#xA;        }&#xA;    }&#xA;}</pre><textarea id="code01a0e8e662927775ab547140827b43ed" name="code01a0e8e662927775ab547140827b43ed" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div><br/>
<br/>
Approach 2<br/>
<div 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="#code01a0e8e6629a726d863bcbef846e8dc3" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code01a0e8e6629a726d863bcbef846e8dc3Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;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="code01a0e8e6629a726d863bcbef846e8dc3Js" name="code01a0e8e6629a726d863bcbef846e8dc3Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">using System;&#xA;using System.Drawing;&#xA;&#xA;public static class DisplayFusionFunction&#xA;{&#xA;    public static void Run(IntPtr windowHandle)&#xA;    {&#xA;        IntPtr hwnd = BFS.Window.GetWindowByText(&quot;Tabman&quot;);&#xA;        &#xA;        if ((ulong)hwnd &amp;gt; 0) &#xA;        {&#xA;            BFS.Window.Focus(hwnd);            // Tabman window&#xA;            BFS.Window.Focus(windowHandle); // The Chrome window that triggered all this.&#xA;        }&#xA;    }&#xA;}</pre><textarea id="code01a0e8e6629a726d863bcbef846e8dc3" name="code01a0e8e6629a726d863bcbef846e8dc3" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>