<?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>Sun, 31 May 2026 14:36:12 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="#code019e7e76bff17569b9608481c9c24053" 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('code019e7e76bff17569b9608481c9c24053Js'); 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="code019e7e76bff17569b9608481c9c24053Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Runtime.InteropServices;

public static class DisplayFusionFunction
{
    private enum ShowWindowEnum : uint
    {
        SW_HIDE = 0,
        SW_SHOWNORMAL = 1,
        SW_NORMAL = 1,
        SW_SHOWMINIMIZED = 2,
        SW_SHOWMAXIMIZED = 3,
        SW_MAXIMIZE = 3,
        SW_SHOWNOACTIVATE = 4,
        SW_SHOW = 5,
        SW_MINIMIZE = 6,
        SW_SHOWMINNOACTIVE = 7,
        SW_SHOWNA = 8,
        SW_RESTORE = 9,
        SW_SHOWDEFAULT = 10,
        SW_FORCEMINIMIZE = 11,
        SW_MAX = 11,
    }

    [DllImport("User32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    private static extern bool ShowWindow(IntPtr hWnd, ShowWindowEnum nCmdShow);
        
    public static void Run(IntPtr windowHandle)
    {
        IntPtr hwnd = BFS.Window.GetWindowByText("Tabman");
        
        if ((ulong)hwnd &gt; 0) 
        {
            if (BFS.Window.IsMinimized(hwnd))
            {
                BFS.Window.Restore(hwnd);
            }
            else // maybe an if goes here?
            {
                // Hide the window
                ShowWindow(hwnd, ShowWindowEnum.SW_HIDE);
                
                // Wait .10 seconds
                BFS.General.ThreadWait(100);
                
                // Show the window
                ShowWindow(hwnd, ShowWindowEnum.SW_SHOW);
            }
        }
    }
}</pre><textarea id="code019e7e76bff17569b9608481c9c24053" name="code019e7e76bff17569b9608481c9c24053" 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="#code019e7e76bff5747da50e4f9ace2efb31" 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('code019e7e76bff5747da50e4f9ace2efb31Js'); 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="code019e7e76bff5747da50e4f9ace2efb31Js" 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)
    {
        IntPtr hwnd = BFS.Window.GetWindowByText("Tabman");
        
        if ((ulong)hwnd &gt; 0) 
        {
            BFS.Window.Focus(hwnd);            // Tabman window
            BFS.Window.Focus(windowHandle); // The Chrome window that triggered all this.
        }
    }
}</pre><textarea id="code019e7e76bff5747da50e4f9ace2efb31" name="code019e7e76bff5747da50e4f9ace2efb31" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>