using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Specify target file and class names
var targetFileName = "Example.exe";
var targetClassName = "ExampleClass";
// Get main window by file
IntPtr mainWindowByFile = BFS.Application.GetMainWindowByFile("*" + targetFileName);
// Get window by class
IntPtr windowByClass = BFS.Window.GetWindowByClass(targetClassName);
// Check if both main window by file and window by class are found
if (mainWindowByFile.ToString() != "0" && windowByClass.ToString() != "0")
{
// Minimize the window
BFS.Window.Minimize(mainWindowByFile);
}
}
}using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Trigger target when run by a Trigger 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
{
public static void Run(IntPtr windowHandle)
{
BFS.Window.Minimize(BFS.Application.GetMainWindowByFile("*example.exe"));
}
}using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Trigger target when run by a Trigger 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
{
public static void Run(IntPtr windowHandle)
{
BFS.Window.Minimize(BFS.Window.GetWindowByClass("ExampleClass"));
}
}