<?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: Script to bring a different window to the front</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=0193459f-cbd3-76c2-ac51-41a5846642f8" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=0193459f-cbd3-76c2-ac51-41a5846642f8</link>
<description>DisplayFusion RSS: Script to bring a different window to the front</description>
<lastBuildDate>Thu, 29 Oct 2026 20:40:13 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=0193459f-cbd3-76c2-ac51-41a5846642f8</generator>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#7</link>
<pubDate>Fri, 22 Nov 2024 13:37:13 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[The restore function won't actually bring it to the front, you'll need to focus the window first. Try using this line instead:
Code
Copy
Select All
BFS.Window.Focus(windowHandle);
and then add another line to re-focus the main Autocad window after]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The restore function won't actually bring it to the front, you'll need to focus the window first. Try using this line instead: <br/>
<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="#code01a18964491a70ec9d37b35e2977d88e" 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('code01a18964491a70ec9d37b35e2977d88eJs'); 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="code01a18964491a70ec9d37b35e2977d88eJs" name="code01a18964491a70ec9d37b35e2977d88eJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">BFS.Window.Focus(windowHandle);</pre><textarea id="code01a18964491a70ec9d37b35e2977d88e" name="code01a18964491a70ec9d37b35e2977d88e" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div><br/>
<br/>
and then add another line to re-focus the main Autocad window after
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#6</link>
<pubDate>Thu, 21 Nov 2024 17:33:54 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[I changed the code a little to streamline, but it's still not working.
Code
Copy
Select All
using System;&#xA;using System.Drawing;&#xA;&#xA;// The &#x27;windowHandle&#x27; parameter will contain the window handle for the:&#xA;//   - Active window when run by hotkey&#xA;//   - Trigger target ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I changed the code a little to streamline, but it's still not working.<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="#code01a18964492976f1af29c80e2be9f14d" 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('code01a18964492976f1af29c80e2be9f14dJs'); 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="code01a18964492976f1af29c80e2be9f14dJs" name="code01a18964492976f1af29c80e2be9f14dJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">using System;&#xA;using System.Drawing;&#xA;&#xA;// The &#x27;windowHandle&#x27; parameter will contain the window handle for the:&#xA;//   - Active window when run by hotkey&#xA;//   - Trigger target when run by a Trigger rule&#xA;//   - TitleBar Button owner when run by a TitleBar Button&#xA;//   - Jump List owner when run from a Taskbar Jump List&#xA;//   - Currently focused window if none of these match&#xA;public static class DisplayFusionFunction&#xA;{&#xA;    public static void Run(IntPtr windowHandle)&#xA;    {&#xA;        // Find the AutoCAD text window&#xA;        IntPtr windowhandle = BFS.Window.GetWindowByText(&quot;AutoCAD Text*&quot;);&#xA;&#xA;        // Bring the AutoCAD text window to the front if AutoCAD has the focus&#xA;        BFS.Window.Minimize(windowHandle);&#xA;        BFS.Window.Restore(windowHandle);&#xA;    }&#xA;}</pre><textarea id="code01a18964492976f1af29c80e2be9f14d" name="code01a18964492976f1af29c80e2be9f14d" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#5</link>
<pubDate>Thu, 21 Nov 2024 17:32:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[Neither of the functions are working.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Neither of the functions are working.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#4</link>
<pubDate>Thu, 21 Nov 2024 13:41:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Is that function currently pulling the text window to the front, or is that part failing as well?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Is that function currently pulling the text window to the front, or is that part failing as well?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#3</link>
<pubDate>Wed, 20 Nov 2024 14:42:54 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Quote:
You want the text window brought to the front, but the main Auto Cad window to have focus?
Yep, exactly.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>You want the text window brought to the front, but the main Auto Cad window to have focus?</div></div><br/>
<br/>
Yep, exactly.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#2</link>
<pubDate>Wed, 20 Nov 2024 13:25:58 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[You want the text window brought to the front, but the main Auto Cad window to have focus?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You want the text window brought to the front, but the main Auto Cad window to have focus?
</div>
]]></content:encoded>
</item>
<item>
<title>Script to bring a different window to the front</title>
<link>https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8</link>
<pubDate>Tue, 19 Nov 2024 18:12:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/script-to-bring-a-different-window-to-the-front/?ID=0193459f-cbd3-76c2-ac51-41a5846642f8</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi all,
I'm trying to use triggers and functions to bring the autocad text window to the front when the main AutoCAD window gets the focus. I have my text window on a second monitor that sometimes gets covered by PDF files or emails.
I have a trigger to run this function when the AutoCAD window...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi all,<br/>
<br/>
I'm trying to use triggers and functions to bring the autocad text window to the front when the main AutoCAD window gets the focus. I have my text window on a second monitor that sometimes gets covered by PDF files or emails.<br/>
<br/>
I have a trigger to run this function when the AutoCAD window gets the focus. But I don't wnat the text window to keep the focus. It doesn't seem to be working and I can't figure out why. Any thoughts?<br/>
<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="#code01a189644944764f8270e88ba32387be" 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('code01a189644944764f8270e88ba32387beJs'); 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="code01a189644944764f8270e88ba32387beJs" name="code01a189644944764f8270e88ba32387beJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%;min-height:75px">using System;&#xA;using System.Drawing;&#xA;&#xA;// The &#x27;windowHandle&#x27; parameter will contain the window handle for the:&#xA;//   - Active window when run by hotkey&#xA;//   - Trigger target when run by a Trigger rule&#xA;//   - TitleBar Button owner when run by a TitleBar Button&#xA;//   - Jump List owner when run from a Taskbar Jump List&#xA;//   - Currently focused window if none of these match&#xA;public static class DisplayFusionFunction&#xA;{&#xA;    public static void Run(IntPtr windowHandle)&#xA;    {&#xA;        // Find the AutoCAD text window&#xA;        IntPtr [] windowhandle = BFS.Window.GetWindowsByText(&quot;AutoCAD Text Window*&quot;);&#xA;&#xA;        // Bring the AutoCAD text window to the front if AutoCAD has the focus&#xA;        bool ok1 = BFS.Window.Minimize(windowHandle);&#xA;        bool ok2 = BFS.Window.Restore(windowHandle);&#xA;    }&#xA;}</pre><textarea id="code01a189644944764f8270e88ba32387be" name="code01a189644944764f8270e88ba32387be" style="position:absolute;top:0;left:-999999px;width:1px;height:1px"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>