<?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: How can I minimize all windows on all monitors?</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=bbb08c65-31f3-481e-80e0-b9462211d91e" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=bbb08c65-31f3-481e-80e0-b9462211d91e</link>
<description>DisplayFusion RSS: How can I minimize all windows on all monitors?</description>
<lastBuildDate>Sat, 16 May 2026 03:33:51 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=bbb08c65-31f3-481e-80e0-b9462211d91e</generator>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#9</link>
<pubDate>Thu, 10 Oct 2024 20:46:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#9</guid>
<category>DisplayFusion</category>
<description><![CDATA[No worries! Your script doesn't seem to have the extra code I added in post #5 above. Could you try deleting the scripted function, then create a new one using the code from that post?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
No worries! Your script doesn't seem to have the extra code I added in post #5 above. Could you try deleting the scripted function, then create a new one using the code from that post?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#8</link>
<pubDate>Sat, 05 Oct 2024 15:48:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#8</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi, sorry for late reply. Here are the files requested.
Thank you!!!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi, sorry for late reply. Here are the files requested.<br/>
Thank you!!!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#7</link>
<pubDate>Wed, 11 Sep 2024 20:27:10 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[Could you send me a debug log for this?
On the DisplayFusion Settings  Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
Reproduce the issue and note the time so we'll know where to check in the log file
Click the "Export Info to File" button on the Setting...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Could you send me a debug log for this?<br/>
<br/>
<ul class="ListBullet">
<li>On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply</li>
<li>Reproduce the issue and note the time so we'll know where to check in the log file</li>
<li>Click the "Export Info to File" button on the Settings > Troubleshooting tab</li>
<li>Reply with the file attached</li>
<li>Disable debug logging after sending the log</li></ul>
<br/>
And also send me a backup of your DisplayFusion Settings? (Settings > Options > Export Settings)<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#6</link>
<pubDate>Sat, 07 Sep 2024 19:01:29 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi, i tried it today. Unfortunately is not working well. I made you a video so you can see how it behaves (my shared onedrive folder: https://1drv.ms/f/s!Au2c29BA5FMKpMcJ0NHuLR2jwteXeA?e=wI8mKe.
As you can see I first clicked in the app window, then pressed my key combination, it didnt do anythi...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi, i tried it today. Unfortunately is not working well. I made you a video so you can see how it behaves (my shared onedrive folder: https://1drv.ms/f/s!Au2c29BA5FMKpMcJ0NHuLR2jwteXeA?e=wI8mKe.<br/>
<br/>
As you can see I first clicked in the app window, then pressed my key combination, it didnt do anything . They I pressed in taskbar (it taskbar from display fusion), pressed key combination - and it crashed , reloaded and after some time all windows went down.<br/>
<br/>
Thank you for your efforts <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile-wink.light.svg" alt=";)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=";)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#5</link>
<pubDate>Fri, 06 Sep 2024 19:06:18 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[Had some time today actually. Could you give this code a try?
Code
Copy
Select All
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Had some time today actually. Could you give this code a try?<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="#code019e2ed8f526763e8b6cd9410cd1a9b9" 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('code019e2ed8f526763e8b6cd9410cd1a9b9Js'); 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="code019e2ed8f526763e8b6cd9410cd1a9b9Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;

// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Window Location target when run by a Window Location rule
// - TitleBar Button owner when run by a TitleBar Button
// - Jump List owner when run from a Taskbar Jump List
// - Currently focused window if none of these match
public static class DisplayFusionFunction
{
    //an enum to set the script state
    private enum ScriptState
    {
        Normal = 0,
Minimized = 1
    }

    public static void Run(IntPtr windowHandle)
    {
        //constants to set and get the window state property
        const string windowStateProperty = "MinimizeAndRestoreWindows_WindowState";

        //random values to use as property values
        const int normalState = 432985;
        const int maximizedState = 347561;

        //if the script is in it's minimized state, restore the saved window positions
        if (IsScriptInMinimizeState())
        {
            //loop over every window
            foreach (IntPtr window in BFS.Window.GetAllWindowHandles())
            {
                // Skip DisplayFusion windows and hidden explorer windows
                if(IsDisplayFusionWindowOrHiddenExplorerWindow(window))
                    continue;
                
                //check for a saved property
                IntPtr windowState = BFS.Window.GetWindowProperty(window, windowStateProperty);

                //if we couldnt find a property, continue to the next window
                if (windowState == IntPtr.Zero)
                    continue ;

                //if the window was in a normal state, restore it
                if (windowState.ToInt64() == normalState)
                    BFS.Window.Restore(window);

                //if the window was in a maximized state, maximize it
                if (windowState.ToInt64() == maximizedState)
                    BFS.Window.Maximize(window);

                //remove the property from the window
                BFS.Window.RemoveWindowProperty(window, windowStateProperty);
            }

            //reset the script state
            SetScriptState(ScriptState.Normal);

            //exit the script
            return;
        }

        //if we got to this point we should save all of the windows, then minimize them
        //loop through all of the visiable windows, save their state, then minimize then
        foreach (IntPtr window in BFS.Window.GetVisibleWindowHandles())
        {
            // Skip DisplayFusion windows and hidden explorer windows
            if(IsDisplayFusionWindowOrHiddenExplorerWindow(window))
                continue;
            
            if (BFS.Window.IsMaximized(window))
                BFS.Window.SetWindowProperty(window, windowStateProperty, new IntPtr(maximizedState));

            if (BFS.Window.IsRestored(window))
                BFS.Window.SetWindowProperty(window, windowStateProperty, new IntPtr(normalState));

            BFS.Window.Minimize(window);
        }

        //set the script state to minimized
        SetScriptState(ScriptState.Minimized);
    }

    //this function quickly checks to see whether we need to restore previously minimized windows
    private static bool IsScriptInMinimizeState()
    {
        //read the setting value
        string state = BFS.ScriptSettings.ReadValue("Minimize and Restore Windows State");

        //return the saved state. if no state saved, return false
        return (state.Length != 0) && (state.Equals("minimized"));
    }

    //this function saves the script state
    private static void SetScriptState(ScriptState state)
    {
        //save the state
        BFS.ScriptSettings.WriteValue("Minimize and Restore Windows State", (state == ScriptState.Normal) ? "normal" : "minimized");
    }
    
    private static bool IsDisplayFusionWindowOrHiddenExplorerWindow(IntPtr window)
    {
        // Ignore any DisplayFusion windows (title bar buttons, etc.)
        // Ignore pesky hidden explorer.exe windows
        string windowClass = BFS.Window.GetClass(window);
        if((windowClass.StartsWith("DF", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("EdgeUiInputTopWndClass", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("EdgeUiInputWndClass", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("NativeHWNDHost", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("ModeInputWnd", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("MetroGhostWindow", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("ImmersiveLauncher", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("ApplicationManager_ImmersiveShellWindow", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("Shell_TrayWnd", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("WorkerW", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("Progman", StringComparison.OrdinalIgnoreCase)) ||
            (windowClass.Equals("SearchPane", StringComparison.OrdinalIgnoreCase)))
        {
            return true;
        }
        
        return false;
    }
}</pre><textarea id="code019e2ed8f526763e8b6cd9410cd1a9b9" name="code019e2ed8f526763e8b6cd9410cd1a9b9" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#4</link>
<pubDate>Fri, 06 Sep 2024 18:48:13 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'll take a look at it next week and see what I can find out.
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'll take a look at it next week and see what I can find out.<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#3</link>
<pubDate>Mon, 02 Sep 2024 11:15:21 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hi, the scripting function dont work correctly. It makes my taskbar on secondary monitor to crash and reopen. And this minimizing is kinda slow (when work and dont make taskbar crash). Can you please fix it?
I dont want to use WIN+D, since I often disable WIN button.
Let me know if you need som...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi, the scripting function dont work correctly. It makes my taskbar on secondary monitor to crash and reopen. And this minimizing is kinda slow (when work and dont make taskbar crash). Can you please fix it? <br/>
<br/>
I dont want to use WIN+D, since I often disable WIN button.<br/>
<br/>
Let me know if you need something. Thank you.<br/>
<br/>
Here is code i use:<br/>
<br/>
```<br/>
<br/>
using System;<br/>
using System.Drawing;<br/>
using System.Collections.Generic;<br/>
using System.Text;<br/>
<br/>
// The 'windowHandle' parameter will contain the window handle for the:<br/>
//   - Active window when run by hotkey<br/>
//   - Window Location target when run by a Window Location rule<br/>
//   - TitleBar Button owner when run by a TitleBar Button<br/>
//   - Jump List owner when run from a Taskbar Jump List<br/>
//   - Currently focused window if none of these match<br/>
public static class DisplayFusionFunction<br/>
{<br/>
    //an enum to set the script state<br/>
    private enum ScriptState<br/>
    {<br/>
        Normal = 0,<br/>
        Minimized = 1<br/>
    }<br/>
    <br/>
    public static void Run(IntPtr windowHandle)<br/>
    {<br/>
        //constants to set and get the window state property<br/>
        const string windowStateProperty = "MinimizeAndRestoreWindows_WindowState";<br/>
        <br/>
        //random values to use as property values<br/>
        const int normalState = 432985;<br/>
        const int maximizedState = 347561;<br/>
        <br/>
        //if the script is in it's minimized state, restore the saved window positions<br/>
        if(IsScriptInMinimizeState())<br/>
        {<br/>
            //loop over every window<br/>
            foreach(IntPtr window in BFS.Window.GetAllWindowHandles())<br/>
            {<br/>
                //check for a saved property<br/>
                IntPtr windowState = BFS.Window.GetWindowProperty(window, windowStateProperty);<br/>
                <br/>
                //if we couldnt find a property, continue to the next window<br/>
                if(windowState == IntPtr.Zero)<br/>
                    continue;<br/>
                    <br/>
                //if the window was in a normal state, restore it<br/>
                if(windowState.ToInt64() == normalState)<br/>
                    BFS.Window.Restore(window);<br/>
                    <br/>
                //if the window was in a maximized state, maximize it<br/>
                if(windowState.ToInt64() == maximizedState)<br/>
                    BFS.Window.Maximize(window);<br/>
                    <br/>
                //remove the property from the window<br/>
                BFS.Window.RemoveWindowProperty(window, windowStateProperty);<br/>
            }<br/>
            <br/>
            //reset the script state<br/>
            SetScriptState(ScriptState.Normal);<br/>
            <br/>
            //exit the script<br/>
            return;<br/>
        }<br/>
                <br/>
        //if we got to this point we should save all of the windows, then minimize them<br/>
        //loop through all of the visiable windows, save their state, then minimize then<br/>
        foreach(IntPtr window in BFS.Window.GetVisibleWindowHandles())<br/>
        {<br/>
            if(BFS.Window.IsMaximized(window))<br/>
                BFS.Window.SetWindowProperty(window, windowStateProperty, new IntPtr(maximizedState));<br/>
                <br/>
            if(BFS.Window.IsRestored(window))<br/>
                BFS.Window.SetWindowProperty(window, windowStateProperty, new IntPtr(normalState));<br/>
                <br/>
            BFS.Window.Minimize(window);                <br/>
        }<br/>
        <br/>
        //set the script state to minimized<br/>
        SetScriptState(ScriptState.Minimized);<br/>
    }<br/>
    <br/>
    //this function quickly checks to see whether we need to restore previously minimized windows<br/>
    private static bool IsScriptInMinimizeState()<br/>
    {<br/>
        //read the setting value<br/>
        string state = BFS.ScriptSettings.ReadValue("Minimize and Restore Windows State");<br/>
        <br/>
        //return the saved state. if no state saved, return false<br/>
        return (state.Length != 0) && (state.Equals("minimized"));<br/>
    }<br/>
    <br/>
    //this function saves the script state<br/>
    private static void SetScriptState(ScriptState state)<br/>
    {<br/>
        //save the state<br/>
        BFS.ScriptSettings.WriteValue("Minimize and Restore Windows State", (state == ScriptState.Normal) ? "normal" : "minimized");<br/>
    }<br/>
}<br/>
<br/>
```
</div>
]]></content:encoded>
</item>
<item>
<title>RE: How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#2</link>
<pubDate>Tue, 06 Jan 2015 19:05:21 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[There's a Scripted Function that can do this. Just go to Settings &gt; Functions &gt; Download Scripted, download the one called "Minimize/Restore All Windows," give it a hotkey, and you're all set
Hope that helps!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
There's a Scripted Function that can do this. Just go to Settings &gt; Functions &gt; Download Scripted, download the one called "Minimize/Restore All Windows," give it a hotkey, and you're all set <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>How can I minimize all windows on all monitors?</title>
<link>https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e</link>
<pubDate>Mon, 05 Jan 2015 20:15:28 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/how-can-i-minimize-all-windows-on-all-monitors/?ID=bbb08c65-31f3-481e-80e0-b9462211d91e</guid>
<category>DisplayFusion</category>
<description><![CDATA[How can I minimize all windows on all monitors on Version 7?
Thanks,]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
How can I minimize all windows on all monitors on Version 7?<br/>
<br/>
Thanks,
</div>
]]></content:encoded>
</item>
</channel>
</rss>