<?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: [Issue solved] &quot;Window Destroyed&quot; trigger</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=3737bb77-0a7a-49f6-8487-c1ef29300012" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=3737bb77-0a7a-49f6-8487-c1ef29300012</link>
<description>DisplayFusion RSS: [Issue solved] &quot;Window Destroyed&quot; trigger</description>
<lastBuildDate>Wed, 22 Apr 2026 20:07:23 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=3737bb77-0a7a-49f6-8487-c1ef29300012</generator>
<item>
<title>RE: [Issue solved] &quot;Window Destroyed&quot; trigger</title>
<link>https://www.displayfusion.com/Discussions/View/issue-solved-window-destroyed-trigger/?ID=3737bb77-0a7a-49f6-8487-c1ef29300012#2</link>
<pubDate>Sun, 23 Oct 2016 10:27:55 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/issue-solved-window-destroyed-trigger/?ID=3737bb77-0a7a-49f6-8487-c1ef29300012#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[I solved it by creating a scripted function, which I then registered in the Window Created trigger for my applications. If anyone else is having similar issues, this is the piece of code I used for the scripted function:
Code
Copy
Select All
using System;
using System.Drawing;
public static...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I solved it by creating a scripted function, which I then registered in the <b>Window Created</b> trigger for my applications. If anyone else is having similar issues, this is the piece of code I used for the scripted function:<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="#code019db6cdf1fd70928de4ebd3b1cf0c83" 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('code019db6cdf1fd70928de4ebd3b1cf0c83Js'); 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="code019db6cdf1fd70928de4ebd3b1cf0c83Js" 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)
    {
        const int waitForever = 0;

        string appPath = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\DayZ\\DayZ.exe";

        uint appId = BFS.Application.GetAppIDByFile(appPath);
        BFS.Application.WaitForExitByAppID(appId, waitForever);
        
        BFS.DisplayFusion.LoadMonitorProfile("Default");
        // Do your own stuff here...
    }
}</pre><textarea id="code019db6cdf1fd70928de4ebd3b1cf0c83" name="code019db6cdf1fd70928de4ebd3b1cf0c83" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
You'll obviously have to substitute the appPath & monitor profile name (or do whatever else you need it to do) with your own.
</div>
]]></content:encoded>
</item>
<item>
<title>[Issue solved] &quot;Window Destroyed&quot; trigger</title>
<link>https://www.displayfusion.com/Discussions/View/issue-solved-window-destroyed-trigger/?ID=3737bb77-0a7a-49f6-8487-c1ef29300012</link>
<pubDate>Sun, 23 Oct 2016 09:29:07 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/issue-solved-window-destroyed-trigger/?ID=3737bb77-0a7a-49f6-8487-c1ef29300012</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm experiencing issues where the "Window Destroyed" trigger isn't executed for certain programs/games. More specifically, FIFA 16 and DayZ. My initial thought would be that Steam and Origin manipulate the process in some way when they shut it down and it therefore isn't registered as it should, ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm experiencing issues where the "Window Destroyed" trigger isn't executed for certain programs/games. More specifically, FIFA 16 and DayZ. My initial thought would be that Steam and Origin manipulate the process in some way when they shut it down and it therefore isn't registered as it should, but then again, FIFA 17 through Origin works flawlessly... Tried hooking into the process, the window title, the window class etc to no avail.<br/>
<br/>
Has anyone experienced similar issues and found a workaround? or is this a known bug?<br/>
<br/>
PS. I'm using the 8.1 beta 2 version (tried the latest stable version first) and Windows 10.<br/>
<br/>
Thank you!
</div>
]]></content:encoded>
</item>
</channel>
</rss>