Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

Restore All Explorer Windows

Description
This function will restore/focus all Explorer windows.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Oct 25, 2018
Date Last Modified
Oct 26, 2018

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
        // Get all window handles
		foreach (IntPtr window in BFS.Window.GetAllWindowHandles())
		{
            // Check if the window class is CabinetWClass (a File Explorer window)
            if (BFS.Window.GetClass(window).Contains("CabinetWClass"))
            {
                // Check if the window is minimized and restore it, otherwise just focus it
                if (BFS.Window.IsMinimized(window))
                    BFS.Window.Restore(window);
                else
                    BFS.Window.Focus(window);
            }
		}
	}
}