<?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: Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=019423db-4343-7343-a730-646c2d59f803" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=019423db-4343-7343-a730-646c2d59f803</link>
<description>DisplayFusion RSS: Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</description>
<lastBuildDate>Thu, 16 Apr 2026 05:08:47 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=019423db-4343-7343-a730-646c2d59f803</generator>
<item>
<title>RE: Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</title>
<link>https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#4</link>
<pubDate>Thu, 02 Jan 2025 16:28:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[That's not something we support, interesting work around you found to get it close though!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That's not something we support, interesting work around you found to get it close though!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</title>
<link>https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#3</link>
<pubDate>Thu, 02 Jan 2025 01:54:05 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Update:
Small change to #2 above &gt;&gt;&gt;
I switched from a:
Scripted Funtion
to
Custom Funtion
Call a Windows Batch Script instead, to KILL the application (Remote Desktop).
Executable for Remote Desktop = "mstsc.exe":
Code
Copy
Select All
taskkill /im mstsc.exe /t /f
This ends u...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<b>Update:</b><br/>
<br/>
Small change to #2 above &gt;&gt;&gt;<br/>
<br/>
I switched from a:<br/>
<ul class="ListBullet"><li>Scripted Funtion</li></ul>
to<br/>
<ul class="ListBullet"><li>Custom Funtion</li></ul>
<br/>
Call a Windows Batch Script instead, to KILL the application (Remote Desktop).<br/>
Executable for Remote Desktop = "mstsc.exe":<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="#code019d94b118d474c1925dfb84e19379f2" 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('code019d94b118d474c1925dfb84e19379f2Js'); 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="code019d94b118d474c1925dfb84e19379f2Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">taskkill /im mstsc.exe /t /f</pre><textarea id="code019d94b118d474c1925dfb84e19379f2" name="code019d94b118d474c1925dfb84e19379f2" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
This ends up working a little faster, but still, the Window moves to Monitor #1, is visible for a few seconds, before the Batch File is executed and kills the process + window.<br/>
<br/>
Any ideas to NOT have window move to Monitor #1 - is greatly appreciated!  <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-grin-stars.light.svg" alt="8)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData="8)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</title>
<link>https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#2</link>
<pubDate>Thu, 02 Jan 2025 00:41:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Thought I post an update of what I have kinda working &gt;
1)  Create 2 Monitor Profiles:
a)   Profile A [Single display]
b)   Profile B [Dual displays]
2)   Create a new custom Scripted Function to close a window (found in other discussions):
a)   Scripted Function name = "Close Remote Desk...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<b>Thought I post an update of what I have kinda working &gt;</b><br/>
<br/>
<b>1)</b>  Create 2 Monitor Profiles:<br/>
<br/>
     a)   Profile A [Single display]<br/>
     b)   Profile B [Dual displays]<br/>
     <br/>
<b>2)</b>   Create a new custom Scripted Function to close a window (found in other discussions):<br/>
<br/>
     a)   Scripted Function name = "Close Remote Desktop"  &gt;&gt;&gt;<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="#code019d94b118e477efbf6bde7bc43a55cc" 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('code019d94b118e477efbf6bde7bc43a55ccJs'); 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="code019d94b118e477efbf6bde7bc43a55ccJs" 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)
    {
        windowHandle = BFS.Window.GetWindowByText("*Remote Desktop*");
        BFS.Window.Close(windowHandle);
    }
}</pre><textarea id="code019d94b118e477efbf6bde7bc43a55cc" name="code019d94b118e477efbf6bde7bc43a55cc" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
<b>3)</b>   Create a new Trigger:<br/>
<br/>
     a)   Event:  " Monitor Profile Changed "<br/>
     b)   Monitor Profile:  " Profile A "<br/>
     c)   Run Function:  "Close Remote Desktop"<br/>
     <br/>
     <br/>
<b>So this actually does <i>WORK</i>, but there is a timing issue.</b><br/>
<br/>
When Monitor #2 is disconnected, the time it takes DisplayFusion to have Monitor Profile = "Profile A", kick in...<br/>
The window moves to Monitor #1, and is displayed there until the Monitor profile kicks in.<br/>
<br/>
Is there a way, or an alternative, to speed this up, or to kill the "Windows Remote Desktop" application faster?<br/>
<br/>
Thanks <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-laugh-beam.light.svg" alt=":laugh:" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":laugh:" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>Combo Trigger?  Close window on Monitor disconnect + Lock window to Monitor</title>
<link>https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803</link>
<pubDate>Wed, 01 Jan 2025 21:52:40 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/combo-trigger-close-window-on-monitor-disconnect-lock-window-to-monitor/?ID=019423db-4343-7343-a730-646c2d59f803</guid>
<category>DisplayFusion</category>
<description><![CDATA[I've got an interesting one:
User of DF for years, and I'm a huge fan.
Non-DisplayFusion environment:
A)  Due to customer privacy Personal Information (PI) data &gt;
B)  Window (Application = Remote Desktop) running on Monitor #2
C)  Window needs to be locked to Monitor #2
D)  Window cannot...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I've got an interesting one:<br/>
<i>User of DF for years, and I'm a huge fan.</i><br/>
<br/>
Non-DisplayFusion environment:<br/>
<ul class="ListBullet">A)  Due to customer privacy Personal Information (PI) data &gt;<br/>
B)  Window (Application = Remote Desktop) running on Monitor #2<br/>
C)  Window needs to be locked to Monitor #2<br/>
D)  Window cannot be displayed on Monitor #1</ul>
<br/>
With DisplayFusion would like to:<br/>
<ul class="ListBullet">1)  Force Window (Application = Remote Desktop) to always run on Monitor #2<br/>
2)  Not allow Window to be moved to Monitor #1<br/>
3)  <b>IF</b> Monitor #2 is <b>disconnected</b> = close window / shutdown application</ul>
<br/>
Reading from previous discussion posts, this may be possible with a <span style="text-decoration:underline;">mix-mash of Monitor Profiles + Scripted Function</span>.<br/>
<br/>
Any thoughts of a DisplayFusion recipe that could accomplish this?
</div>
]]></content:encoded>
</item>
</channel>
</rss>