Title

Message

Confirm

DisplayFusion Scripted Function (Macro) Help

DisplayFusion Scripted Function (Macro) Help

These functions can be used to create your own custom Scripted Function (Macro) inside DisplayFusion.
Use C# or Visual Basic and create anything you can imagine!
Need help creating a Scripted Function (Macro)? Please contact us, we would be happy to help you out!

< Return to DisplayFusion Scripted Functions (Macros)

Functions

  • BFS.Application: Contains functions to deal with Applications and Processes.
  • BFS.Audio: Contains functions to deal with Audio devices and volumes.
  • BFS.Clipboard: Contains functions to deal with the Clipboard.
  • BFS.Dialog: Contains functions to show message boxes and get user input.
  • BFS.DisplayFusion: Contains functions specific to DisplayFusion.
  • BFS.General: Contains general purpose functions that don't fit into any other groups.
  • BFS.Input: Contains functions to simulate mouse or keyboard input.
  • BFS.Monitor: Contains functions related to attached desktop monitors.
  • BFS.ScreenSaver: Contains functions to manage your Screen Savers.
  • BFS.ScriptSettings: Contains functions that allow you to read and write setting values that are persisted between running functions and can be shared between functions.
  • BFS.Taskbar: Containts functions to deal with the Windows taskbar.
  • BFS.Text: Contains functions to manipulate text strings.
  • BFS.Web: Contains functions related to web requests and the internet.
  • BFS.Window: Contains functions to manipulate desktop windows.

BFS.Application

Contains functions to deal with Applications and Processes.

BFS.Application.GetAllRunningApplicationFiles

Description Gets a list of filenames of all running processes that DisplayFusion has access to see.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string[] GetAllRunningApplicationFiles();
Sample
string[] files = BFS.Application.GetAllRunningApplicationFiles();

BFS.Application.GetAllRunningApplicationIDs

Description Gets a list of all running appIDs (processIDs) that DisplayFusion has access to see.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
uint[] GetAllRunningApplicationIDs();
Sample
uint[] apps = BFS.Application.GetAllRunningApplicationIDs();

BFS.Application.GetAppIDByFile

Description Gets the appID (processID) of the given file, if that file is running.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
uint GetAppIDByFile(string file);
Sample
uint appID = BFS.Application.GetAppIDByFile("*excel.exe");

BFS.Application.GetAppIDByWindow

Description Gets the appID (processID) of the given window.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
uint GetAppIDByWindow(IntPtr windowHandle);
Sample
uint appID = BFS.Application.GetAppIDByWindow(windowHandle);

BFS.Application.GetMainFileByAppID

Description This function returns the main filename from the given App ID.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.2 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetMainFileByAppID(uint appID);
Sample
string file = BFS.Application.GetMainFileByAppID(appID);

BFS.Application.GetMainFileByWildcard

Description Returns the full path for the given wildcard for a running process.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
string GetMainFileByWildcard(string file);
Sample
string mainfile = GetMainFileByWildcard("*\Outlook.exe");

BFS.Application.GetMainFileByWindow

Description This function returns the main filename from the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.2 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetMainFileByWindow(IntPtr windowHandle);
Sample
string file = BFS.Application.GetMainFileByWindow(windowHandle);

BFS.Application.GetMainWindowByAppID

Description Returns the main window handle for the given appID (ProcessID).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetMainWindowByAppID(uint appID);
Sample
IntPtr windowHandle = BFS.Application.GetMainWindowByAppID(appID);

BFS.Application.GetMainWindowByFile

Description Returns the main window handle for the given absolute filename or wildcard.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetMainWindowByFile(string file);
Sample
IntPtr windowHandle = BFS.Application.GetMainWindowByFile("*excel.exe");

BFS.Application.IsAppRunningByAppID

Description Checks if the given appID (ProcessID) is running.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsAppRunningByAppID(uint appID);
Sample
bool isRunning = BFS.Application.IsAppRunningByAppID(appID);

BFS.Application.IsAppRunningByFile

Description Checks if the given absolute filename or wildcard is running.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsAppRunningByFile(string file);
Sample
bool isRunning = BFS.Application.IsAppRunningByFile("*excel.exe");

BFS.Application.Kill

Description Terminates the given appID (ProcessID).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Kill(uint appID);
Sample
bool ok = BFS.Application.Kill(appID);

BFS.Application.Start

Description Starts the given application using the command line parameters (optional).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
uint Start(string filename, string arguments);
Sample
uint appID = BFS.Application.Start("C:\\Games\\Main.exe", "-Mode=1");

BFS.Application.WaitForExitByAppID

Description Waits for the given appID (ProcessID) to exit, stops waiting after 5000ms (5 seconds). Pass 0 for waitMS to wait forever until it exits.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool WaitForExitByAppID(uint appID, uint waitMS);
Sample
bool exited = BFS.Application.WaitForExitByAppID(appID, 5000);

BFS.Application.WaitForExitByFile

Description Waits for the given absolute filename or wildcard to exit, stops waiting after 5000ms (5 seconds). Pass 0 for waitMS to wait forever until it exits.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool WaitForExitByFile(uint appID, uint waitMS);
Sample
bool exited = BFS.Application.WaitForExitByFile("*excel.exe", 5000);

BFS.Audio

Contains functions to deal with Audio devices and volumes.

BFS.Audio.AdjustVolumeDown

Description Adjusts the master volume down one tick.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool AdjustVolumeDown();
Sample
bool ok = BFS.Audio.AdjustVolumeDown();

BFS.Audio.AdjustVolumeUp

Description Adjusts the master volume up one tick.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool AdjustVolumeUp();
Sample
bool ok = BFS.Audio.AdjustVolumeUp();

BFS.Audio.GetApplicationMute

Description Gets whether or not an application is muted from its process ID.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool GetApplicationMute(uint appID);
Sample
bool isMuted = BFS.Audio.GetApplicationMute(appID);

BFS.Audio.GetApplicationVolume

Description Gets the volume of an application by its process ID. The returned value will be between 0 and 1.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
float GetApplicationVolume(uint appID);
Sample
float volume = BFS.Audio.SetApplicationVolume(appID);

BFS.Audio.GetDefaultPlaybackCommunications

Description Gets the name of the default playback device for communications.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetDefaultPlaybackCommunications();
Sample
string defaultName = BFS.Audio.GetDefaultPlaybackCommunications();

BFS.Audio.GetDefaultPlaybackSounds

Description Gets the name of the default playback device for sounds.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetDefaultPlaybackSounds();
Sample
string defaultName = BFS.Audio.GetDefaultPlaybackSounds();

BFS.Audio.GetDefaultRecordingCommunications

Description Gets the name of the default recording device for communications.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetDefaultRecordingCommunications();
Sample
string defaultName = BFS.Audio.GetDefaultRecordingCommunications();

BFS.Audio.GetDefaultRecordingSounds

Description Gets the name of the default recording device for sounds.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetDefaultRecordingSounds();
Sample
string defaultName = BFS.Audio.GetDefaultRecordingSounds();

BFS.Audio.GetPlaybackDevices

Description Gets a list of all the enabled playback devices.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
string[] GetPlaybackDevices();
Sample
string[] devices = GetPlaybackDevices();

BFS.Audio.GetRecordingDevices

Description Gets a list of all the enabled recording devices.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
string[] GetRecordingDevices();
Sample
string[] devices = GetRecordingDevices();

BFS.Audio.PlayFile

Description This function allows you to play an audio file (wav, mp3... etc).
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
bool PlayFile(string filename);
Sample
bool ok = BFS.Audio.PlayFile("C:\myfile.mp3");

BFS.Audio.PlayWAV

Description This function allows you to play a .wav file.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 4.0 and higher
Function
bool PlayWAV(string filename);
Sample
bool ok = BFS.Audio.PlayWAV("C:\myfile.wav");

BFS.Audio.SetApplicationMute

Description Sets mute on an application by its process ID.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool SetApplicationMute(uint appID, bool mute);
Sample
bool ok = BFS.Audio.SetApplicationMute(appID, true);

BFS.Audio.SetApplicationVolume

Description Sets the volume of an application by its process ID. Accepts values between 0 and 1.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool SetApplicationVolume(uint appID, float volume);
Sample
bool ok = BFS.Audio.SetApplicationVolume(appID, 0.5f);

BFS.Audio.SetApplicationVolumeMax

Description Raises the volume of an application to its maximum value by process ID.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool SetApplicationVolumeMax(uint appID);
Sample
bool ok = BFS.Audio.SetApplicationVolumeMax(appID);

BFS.Audio.SetApplicationVolumeMin

Description Lowers the volume of an application to its minimum value by process ID.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool SetApplicationVolumeMin(uint appID);
Sample
bool ok = BFS.Audio.SetApplicationVolumeMin(appID);

BFS.Audio.SetDefaultPlaybackCommunications

Description Sets the default playback device for communications (like Skype).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetDefaultPlaybackCommunications(string name);
Sample
bool ok = BFS.Audio.SetDefaultPlaybackCommunications("Main Speakers");

BFS.Audio.SetDefaultPlaybackSounds

Description Sets the default playback device for sounds, music and applications.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetDefaultPlaybackSounds(string name);
Sample
bool ok = BFS.Audio.SetDefaultPlaybackSounds("Main Speakers");

BFS.Audio.SetDefaultRecordingCommunications

Description Sets the default recording device for communications (like Skype).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetDefaultRecordingCommunications(string name);
Sample
bool ok = BFS.Audio.SetDefaultRecordingCommunications("Main Microphone");

BFS.Audio.SetDefaultRecordingSounds

Description Sets the default recording device for sounds, music and applications.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetDefaultRecordingSounds(string name);
Sample
bool ok = BFS.Audio.SetDefaultRecordingSounds("Main Microphone");

BFS.Audio.SetVolumeMax

Description Sets the master volume to maximum.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetVolumeMax();
Sample
bool ok = BFS.Audio.SetVolumeMax();

BFS.Audio.SetVolumeMin

Description Sets the master volume to 0.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetVolumeMin();
Sample
bool ok = BFS.Audio.SetVolumeMin();

BFS.Audio.ToggleMute

Description Toggles the master volume mute on/off.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool ToggleMute();
Sample
bool ok = BFS.Audio.ToggleMute();

BFS.Clipboard

Contains functions to deal with the Clipboard.

BFS.Clipboard.Clear

Description Clears the clipboard.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Clear();
Sample
bool ok = BFS.Clipboard.Clear();

BFS.Clipboard.Copy

Description Copies from the currently active window. (same as pressing Ctrl+C)
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Copy();
Sample
bool ok = BFS.Clipboard.Copy();

BFS.Clipboard.CopyText

Description Copies from the currently active window and returns the text string that was copied.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string CopyText();
Sample
string text = BFS.Clipboard.CopyText();

BFS.Clipboard.GetText

Description Returns the text value that is currently on the clipboard.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetText();
Sample
string text = BFS.Clipboard.GetText();

BFS.Clipboard.HasImage

Description Returns true if the clipboard currently contains an image.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool HasImage();
Sample
bool hasImage = BFS.Clipboard.HasImage();

BFS.Clipboard.HasText

Description Returns true if the clipboard currently contains text.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool HasText();
Sample
bool hasText = BFS.Clipboard.HasText();

BFS.Clipboard.Paste

Description Pastes to the currently active window. (same as pressing Ctrl+V)
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Paste();
Sample
bool ok = BFS.Clipboard.Paste();

BFS.Clipboard.PasteText

Description Pastes the given text to the current active window.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool PasteText(string text);
Sample
bool ok = BFS.Clipboard.PasteText("My text.");

BFS.Clipboard.SetHTML

Description Sets the given html code to the clipboard.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetHTML(string html);
Sample
bool ok = BFS.Clipboard.SetHTML("<li>List Item</li>");

BFS.Clipboard.SetText

Description Sets the given text value to the clipboard.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetText(string text);
Sample
bool ok = BFS.Clipboard.SetText("My text.");

BFS.Dialog

Contains functions to show message boxes and get user input.

BFS.Dialog.GetUserConfirm

Description Shows a Yes/No prompt to the user, and returns True/False depending on what they select.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool GetUserConfirm(string message);
Sample
bool isHappy = BFS.Dialog.GetUserConfirm("Are you happy?");

BFS.Dialog.GetUserInput

Description Shows an input dialog to the user where they can type anything they want. You can provide a preset value.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetUserInput(string title, string value);
Sample
string input = BFS.Dialog.GetUserInput("How old are you?", "preset value here");

BFS.Dialog.GetUserInputList

Description Shows a list of given items and returns the selected string. Returns an empty string if the user clicks "Cancel".
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetUserInputList(string title, string[] values);
Sample
string input = BFS.Dialog.GetUserInputList("Test", new string[] { "Item #1", "Item #2", "Item #3" });

BFS.Dialog.ShowMessageError

Description Shows an error messagebox to the user with an OK button.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
void ShowMessageError(string message);
Sample
BFS.Dialog.ShowMessageInfo("An error has occurred!");

BFS.Dialog.ShowMessageErrorMonospaced

Description Shows an error messagebox to the user with an OK button in a Monospaced font.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
void ShowMessageErrorMonospaced(string message);
Sample
BFS.Dialog.ShowMessageErrorMonospaced("An error has occurred in monoospaced!");

BFS.Dialog.ShowMessageInfo

Description Shows a messagebox to the user with an OK button.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
void ShowMessageInfo(string message);
Sample
BFS.Dialog.ShowMessageInfo("This is a message!");

BFS.Dialog.ShowMessageInfoMonospaced

Description Shows a messagebox to the user with an OK button using a Monospaced font.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
void ShowMessageInfoMonospaced(string message);
Sample
BFS.Dialog.ShowMessageInfoMonospaced("This is a monospaced message!");

BFS.Dialog.ShowTrayMessage

Description Shows a tray balloon or toast message.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
void ShowTrayMessage(string message);
Sample
BFS.Dialog.ShowTrayMessage("My tray message!");

BFS.DisplayFusion

Contains functions specific to DisplayFusion.

BFS.DisplayFusion.DisableAllTaskbars

Description This disables the Multi-Monitor Taskbar feature in DisplayFusion.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool DisableAllTaskbars();
Sample
bool ok = BFS.DisplayFusion.DisableAllTaskbars();

BFS.DisplayFusion.DisableTaskbar

Description This disables a Taskbar on a specific monitor.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool DisableTaskbar(uint monitorID);
Sample
bool ok = BFS.DisplayFusion.DisableTaskbar(1); //Disables the Taskbar on Monitor #1

BFS.DisplayFusion.EnableAllTaskbars

Description This enables the Multi-Monitor Taskbar feature in DisplayFusion.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool EnableAllTaskbars();
Sample
bool ok = BFS.DisplayFusion.EnableAllTaskbars();

BFS.DisplayFusion.EnableTaskbar

Description This enables a Taskbar on a specific monitor.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool EnableTaskbar(uint monitorID);
Sample
bool ok = BFS.DisplayFusion.EnableTaskbar(1); //Enables the Taskbar on Monitor #1

BFS.DisplayFusion.GetCurrentMonitorProfile

Description This function returns the name of the current monitor profile.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
string GetCurrentMonitorProfile();
Sample
string profileName = BFS.DisplayFusion.GetCurrentMonitorProfile();

BFS.DisplayFusion.GetCurrentWallpaperProfile

Description This function returns the name of the current wallpaper profile.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
string GetCurrentWallpaperProfile();
Sample
string profileName = BFS.DisplayFusion.GetCurrentWallpaperProfile();

BFS.DisplayFusion.GetDesktopIconsProfiles

Description This function returns a list of all the Desktop Icon profile names.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
string[] GetDesktopIconsProfiles();
Sample
string[] profiles = BFS.DisplayFusion.GetDesktopIconsProfiles();

BFS.DisplayFusion.GetMonitorProfiles

Description This function returns a list of all the Monitor Profile names.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
string[] GetMonitorProfiles();
Sample
string[] profiles = BFS.DisplayFusion.GetMonitorProfiles();

BFS.DisplayFusion.GetWallpaperProfiles

Description This function returns a list of all the Wallpaper Profile names.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
string[] GetWallpaperProfiles();
Sample
string[] profiles = BFS.DisplayFusion.GetWallpaperProfiles();

BFS.DisplayFusion.LoadDesktopIconsProfile

Description Loads the given Desktop Icons Profile by name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool LoadDesktopIconsProfile(string name);
Sample
bool ok = BFS.DisplayFusion.LoadDesktopIconsProfile("My Home Icons");

BFS.DisplayFusion.LoadMonitorProfile

Description Loads the given Monitor Profile by name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool LoadMonitorProfile(string name);
Sample
bool ok = BFS.DisplayFusion.LoadMonitorProfile("My 3 Monitors");

BFS.DisplayFusion.LoadMonitorProfileHideErrors

Description Loads the given Monitor Profile by name and doesn't show any errors if it fails.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool LoadMonitorProfileHideErrors(string name);
Sample
bool ok = BFS.DisplayFusion.LoadMonitorProfileHideErrors("My 3 Monitors");

BFS.DisplayFusion.LoadWallpaperProfile

Description Loads the given Wallpaper Profile by name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool LoadWallpaperProfile(string name);
Sample
bool ok = BFS.DisplayFusion.LoadWallpaperProfile("My 3 Wallpapers");

BFS.DisplayFusion.ReloadSettings

Description This forces DisplyaFusion to reload its settings from the registry and reapply them.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool ReloadSettings();
Sample
bool ok = BFS.DisplayFusion.ReloadSettings();

BFS.DisplayFusion.RunFunction

Description Runs another DisplayFusion function. It can be a built-in, custom or scripted function's name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool RunFunction(string name);
Sample
bool ok = BFS.DisplayFusion.RunFunction("My Other Function");

BFS.DisplayFusion.RunFunctionAndWait

Description Runs another DisplayFusion function and waits for it to finish. It can be a built-in, custom or scripted function's name.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
Function
bool RunFunctionAndWait(string name);
Sample
bool ok = BFS.DisplayFusion.RunFunctionAndWait("My Other Function");

BFS.DisplayFusion.RunFunctionAndWaitWithWindowHandle

Description Runs another DisplayFusion function and passes the given window handle to the function. It waits for the function to finish before returning. It can be a built-in, custom or scripted function's name.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
Function
bool RunFunctionAndWaitWithWindowHandle(string name, IntPtr windowHandle);
Sample
bool ok = BFS.DisplayFusion.RunFunctionAndWaitWithWindowHandle("My Other Function", windowHandle);

BFS.DisplayFusion.RunFunctionWithWindowHandle

Description Runs another DisplayFusion function and passes the given window handle to the function. It can be a built-in, custom or scripted function's name.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool RunFunctionWithWindowHandle(string name, IntPtr windowHandle);
Sample
bool ok = BFS.DisplayFusion.RunFunctionWithWindowHandle("My Other Function", windowHandle);

BFS.DisplayFusion.SaveDesktopIconsProfile

Description Saves your current desktop icon layout to the given Desktop Icons Profile name. (overwrites if exists, or creates new if needed)
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool SaveDesktopIconsProfile(string name);
Sample
bool ok = BFS.DisplayFusion.SaveDesktopIconsProfile("My Home Icons");

BFS.DisplayFusion.WallpaperFeatureDisable

Description Disables the Desktop Wallpaper feature.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperFeatureDisable();
Sample
bool ok = BFS.DisplayFusion.WallpaperFeatureDisable();

BFS.DisplayFusion.WallpaperFeatureEnable

Description Enables the Desktop Wallpaper feature.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperFeatureEnable();
Sample
bool ok = BFS.DisplayFusion.WallpaperFeatureEnable();

BFS.DisplayFusion.WallpaperFeatureToggle

Description Toggles the Desktop Wallpaper feature on/off.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperFeatureToggle();
Sample
bool ok = BFS.DisplayFusion.WallpaperFeatureToggle();

BFS.DisplayFusion.WallpaperSlideshowPause

Description Pauses the Desktop Wallpaper Slideshow feature.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperSlideshowPause();
Sample
bool ok = BFS.DisplayFusion.WallpaperSlideshowPause();

BFS.DisplayFusion.WallpaperSlideshowResume

Description Resumes the Desktop Wallpaper Slideshow feature.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperSlideshowResume();
Sample
bool ok = BFS.DisplayFusion.WallpaperSlideshowResume();

BFS.DisplayFusion.WallpaperSlideshowToggle

Description Toggles the Desktop Wallpaper Slideshow feature on/off.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
Function
bool WallpaperSlideshowToggle();
Sample
bool ok = BFS.DisplayFusion.WallpaperSlideshowToggle();

BFS.General

Contains general purpose functions that don't fit into any other groups.

BFS.General.GetAppExecutable

Description Gets the current application's executable.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetAppExecutable();
Sample
string exe = BFS.General.GetAppExecutable();

BFS.General.GetAppInstallPath

Description Gets the current application's installation folder.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetAppInstallPath();
Sample
string path = BFS.General.GetAppInstallPath();

BFS.General.GetAppIsProVersion

Description Returns true if the application is currently the Pro Licenses version.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool GetAppIsProVersion();
Sample
bool isPro = BFS.General.GetAppIsProVersion();

BFS.General.GetAppVersion

Description Gets the current application's version.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetAppVersion();
Sample
string version = BFS.General.GetAppVersion();

BFS.General.IsDesktopLocked

Description Returns true if the desktop is currently locked.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsDesktopLocked();
Sample
bool isLocked = BFS.General.IsDesktopLocked();

BFS.General.LockDesktop

Description Locks the desktop and forces the user to login again.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool LockDesktop();
Sample
bool ok = BFS.General.LockDesktop();

BFS.General.LogText

Description Logs a text string in your Debug log (if enabled) for troubleshooting.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
void LogText(string text);
Sample
BFS.General.LogText("This will appear in your application log!");

BFS.General.SleepMonitors

Description Puts all of the monitors to sleep (power-saving mode).
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SleepMonitors();
Sample
bool ok = BFS.General.SleepMonitors();

BFS.General.ThreadWait

Description Waits for 500ms before running the next lines of code.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool ThreadWait(uint waitMS);
Sample
bool ok = BFS.General.ThreadWait(500);

BFS.General.WakeMonitors

Description Wakes up any sleeping (power-saving) monitors.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool WakeMonitors();
Sample
bool ok = BFS.General.WakeMonitors();

BFS.Input

Contains functions to simulate mouse or keyboard input.

BFS.Input.GetMousePositionX

Description Gets the mouse X position on the screen.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
int GetMousePositionX();
Sample
int mouseX = BFS.Input.GetMousePositionX();

BFS.Input.GetMousePositionY

Description Gets the mouse Y position on the screen.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
int GetMousePositionY();
Sample
int mouseY = BFS.Input.GetMousePositionY();

BFS.Input.IsKeyDown

Description Returns true if the Virtual Key Codes (VK) are down. Separate multiple codes with ; and the function will only return true if all the keys are pressed at once.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsKeyDown(string keys);
Sample
bool isKeyDown = BFS.Input.IsKeyDown("54;65");

BFS.Input.IsMouseDown

Description Returns true if the Virtual Key Codes (VK) are down. Separate multiple codes with ; and the function will only return true if all the keys and mouse buttons are pressed at once.
Compatibility
DisplayFusionDisplayFusion: 9.2 and higher
ClipboardFusionClipboardFusion: 5.3 and higher
VoiceBotVoiceBot: 3.2 and higher
Function
bool IsMouseDown(string buttons);
Sample
bool isMouseDown = BFS.Input.IsMouseDown("1;");

BFS.Input.LeftClickMouse

Description Simulates a mouse left-click at the current mouse position.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool LeftClickMouse();
Sample
bool ok = BFS.Input.LeftClickMouse();

BFS.Input.MiddleClickMouse

Description Simulates a mouse middle-click at the current mouse position.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool MiddleClickMouse();
Sample
bool ok = BFS.Input.MiddleClickMouse()

BFS.Input.RightClickMouse

Description Simulates a mouse right-click at the current mouse position.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool RightClickMouse();
Sample
bool ok = BFS.Input.RightClickMouse()

BFS.Input.SendKeyDown

Description Presses a key down without releasing it. This is the same as pressing and holding a key.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 2.0 and higher
Function
bool SendKeyDown(string keys);
Sample
bool ok = BFS.Input.SendKeyDown("X"); //Press X

BFS.Input.SendKeys

Description Simulates key presses, with or without modifiers (Alt, Ctrl, Shift, Win).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SendKeys(string keys);
Sample
bool ok = BFS.Input.SendKeys("%{X}"); //Sends Alt+X

BFS.Input.SendKeysFast

Description The same as SendKeys but uses a lower delay for the keypress duration. This may cause compatibility issues with some applications.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SendKeysFast(string keys);
Sample
bool ok = BFS.Input.SendKeysFast("%{X}"); //Sends Alt+X

BFS.Input.SendKeyUp

Description Releases a key that was previously pressed.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 2.0 and higher
Function
bool SendKeyUp(string keys);
Sample
bool ok = BFS.Input.SendKeyUp("X"); //Release X

BFS.Input.SendText

Description This function types the given text string, as if it was being typed by a user.
Compatibility
DisplayFusionDisplayFusion: 7.3 and higher
ClipboardFusionClipboardFusion: 4.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
bool SendText(string text);
Sample
bool ok = BFS.Input.SendText("hello world"); //Types out 'hello world'

BFS.Input.SetMousePosition

Description Moves the mouse cursor to a specific location on the screen.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetMousePosition(int x, int y);
Sample
bool ok = BFS.Input.SetMousePosition(100, 200); //Moves the mouse cursor to 100, 200

BFS.Input.SetMousePositionRelative

Description Moves the mouse cursor relatively from the current position on the screen and generates WM_MouseMove messages.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetMousePositionRelative(int x, int y);
Sample
bool ok = BFS.Input.SetMousePositionRelative(10, 20); //Moves the mouse cursor right 10, down 20

BFS.Input.SetMousePositionRelativeNoAcceleration

Description Moves the mouse cursor relatively from the current position on the screen without any DPI acceleration, and doesn't generate WM_MouseMove messages.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
ClipboardFusionClipboardFusion: Coming Soon!
VoiceBotVoiceBot: 3.4 and higher
Function
bool SetMousePositionRelativeNoAcceleration(int x, int y);
Sample
bool ok = BFS.Input.SetMousePositionRelativeNoAcceleration(10, 20); //Moves the mouse cursor right 10, down 20

BFS.Monitor

Contains functions related to attached desktop monitors.

BFS.Monitor.GetMonitorBounds

Description Gets a list of attached monitor bounds sorted by logical monitor order from left to right.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle[] GetMonitorBounds();
Sample
Rectangle[] bounds = BFS.Monitor.GetMonitorBounds();

BFS.Monitor.GetMonitorBoundsByID

Description Gets the bounds for a specific monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorBoundsByID(uint monitorID);
Sample
Rectangle bounds = BFS.Monitor.GetMonitorBoundsByID(monitorID);

BFS.Monitor.GetMonitorBoundsByMouseCursor

Description Gets the bounds for the monitor where the mouse cursor is located.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorBoundsByMouseCursor();
Sample
Rectangle bounds = BFS.Monitor.GetMonitorBoundsByMouseCursor();

BFS.Monitor.GetMonitorBoundsByRect

Description Gets the bounds for the monitor for the given rectangle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorBoundsByRect(Rectangle rect);
Sample
Rectangle bounds = BFS.Monitor.GetMonitorBoundsByRect(rect);

BFS.Monitor.GetMonitorBoundsByWindow

Description Gets the bounds of the monitor where the window is located.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorBoundsByWindow(IntPtr windowHandle);
Sample
Rectangle bounds = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);

BFS.Monitor.GetMonitorBoundsByXY

Description Gets the bounds of the monitor that contains the given coordinates.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorBoundsByXY(int x, int y);
Sample
Rectangle bounds = BFS.Monitor.GetMonitorBoundsByXY(x, y);

BFS.Monitor.GetMonitorBoundsNoSplits

Description Gets a list of attached monitor bounds sorted by logical monitor order from left to right, ignores any monitor splits that you may have configured.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
Function
Rectangle[] GetMonitorBoundsNoSplits();
Sample
Rectangle[] bounds = BFS.Monitor.GetMonitorBoundsNoSplits();

BFS.Monitor.GetMonitorCountEnabled

Description Gets a count of the number of attached monitors, including splits.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
Function
int GetMonitorCountEnabled();
Sample
int count = BFS.Monitor.GetMonitorCountEnabled();

BFS.Monitor.GetMonitorCountEnabledAndDisabled

Description Gets a count of the number of attached or disconnected monitors.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
Function
int GetMonitorCountEnabledAndDisabled();
Sample
int count = BFS.Monitor.GetMonitorCountEnabledAndDisabled();

BFS.Monitor.GetMonitorCountEnabledNoSplits

Description Gets a count of the number of attached monitors, excluding splits.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
Function
int GetMonitorCountEnabledNoSplits();
Sample
int count = BFS.Monitor.GetMonitorCountEnabledNoSplits();

BFS.Monitor.GetMonitorIDByRect

Description Gets the ID of the monitor for the given rectangle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
uint GetMonitorIDByRect(Rectangle rect);
Sample
uint monitorID = BFS.Monitor.GetMonitorIDByRect(rect);

BFS.Monitor.GetMonitorIDByWindow

Description Gets the ID of the monitor where the window is located.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
uint GetMonitorIDByWindow(IntPtr windowHandle);
Sample
uint monitormonitorID = BFS.Monitor.GetMonitorIDByWindow(windowHandle);

BFS.Monitor.GetMonitorIDByXY

Description Gets the ID of the monitor that contains the given coordinates.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
uint GetMonitorIDByXY(int x, int y);
Sample
uint monitormonitorID = BFS.Monitor.GetMonitorIDByXY(x, y);

BFS.Monitor.GetMonitorIDs

Description Gets a list of attached monitor IDs sorted by logical monitor order from left to right.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
uint[] GetMonitorIDs();
Sample
uint[] ids = BFS.Monitor.GetMonitorIDs();

BFS.Monitor.GetMonitorWorkAreaByID

Description Gets the work area for a specific monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorWorkAreaByID(uint monitorID);
Sample
Rectangle area = BFS.Monitor.GetMonitorWorkAreaByID(monitorID);

BFS.Monitor.GetMonitorWorkAreaByMouseCursor

Description Gets the work area for the monitor where the mouse cursor is located.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorWorkAreaByMouseCursor();
Sample
Rectangle area = BFS.Monitor.GetMonitorWorkAreaByMouseCursor();

BFS.Monitor.GetMonitorWorkAreaByRect

Description Gets the work area for the monitor for the given rectangle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorWorkAreaByRect(Rectangle rect);
Sample
Rectangle area = BFS.Monitor.GetMonitorWorkAreaByRect(rect);

BFS.Monitor.GetMonitorWorkAreaByWindow

Description Gets the work area of the monitor where the window is located.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorWorkAreaByWindow(IntPtr windowHandle);
Sample
Rectangle area = BFS.Monitor.GetMonitorWorkAreaByWindow(windowHandle);

BFS.Monitor.GetMonitorWorkAreaByXY

Description Gets the work area of the monitor that contains the given coordinates.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetMonitorWorkAreaByXY(int x, int y);
Sample
Rectangle area = BFS.Monitor.GetMonitorWorkAreaByXY(x, y);

BFS.Monitor.GetMonitorWorkAreas

Description Gets a list of attached monitor workareas sorted by logical monitor order from left to right.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle[] GetMonitorWorkAreas();
Sample
Rectangle[] workareas = BFS.Monitor.GetMonitorWorkAreas();

BFS.Monitor.GetPrimaryMonitorBounds

Description Gets the bounds of the primary monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetPrimaryMonitorBounds();
Sample
Rectangle bounds = BFS.Monitor.GetPrimaryMonitorBounds();

BFS.Monitor.GetPrimaryMonitorID

Description Gets the ID of the primary monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
uint GetPrimaryMonitorID();
Sample
uint monitormonitorID = BFS.Monitor.GetPrimaryMonitorID();

BFS.Monitor.GetPrimaryMonitorWorkArea

Description Gets the work area of the primary monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
Rectangle GetPrimaryMonitorWorkArea();
Sample
Rectangle area = BFS.Monitor.GetPrimaryMonitorWorkArea();

BFS.Monitor.ShowMonitorSelector

Description Allows the user to select a monitor from a dialog and returns the monitorID or returns 0 if they cancel.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
uint ShowMonitorSelector();
Sample
uint monitorID = BFS.Monitor.ShowMonitorSelector();

BFS.ScreenSaver

Contains functions to manage your Screen Savers.

BFS.ScreenSaver.GetPasswordLocked

Description This function returns true if the screen saver requires a password.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 1.2 and higher
Function
bool GetPasswordLocked();
Sample
bool isPasswordLocked = BFS.ScreenSaver.GetPasswordLocked();

BFS.ScreenSaver.GetTimeoutMinutes

Description This function gets the number of minutes before a screen saver will start (the screen saver timeout).
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 1.2 and higher
Function
int GetTimeoutMinutes();
Sample
int timeoutMinutes = BFS.ScreenSaver.GetTimeoutMinutes();

BFS.ScreenSaver.SetPasswordLocked

Description This function sets whether you need to enter a screen saver after it runs.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 1.2 and higher
Function
bool SetPasswordLocked(bool isPasswordLocked);
Sample
bool ok = BFS.ScreenSaver.SetPasswordLocked(true); //sets to need a password

BFS.ScreenSaver.SetTimeoutMinutes

Description This function sets the screen saver timeout in minutes.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.4 and higher
VoiceBotVoiceBot: 1.2 and higher
Function
bool SetTimeoutMinutes(int timeoutMinutes);
Sample
bool ok = BFS.ScreenSaver.SetTimeoutMinutes(60); //60 minutes

BFS.ScriptSettings

Contains functions that allow you to read and write setting values that are persisted between running functions and can be shared between functions.

BFS.ScriptSettings.DeleteAllValues

Description Deletes all saved values.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
ClipboardFusionClipboardFusion: Coming Soon!
VoiceBotVoiceBot: Coming Soon!
Function
bool DeleteAllValues();
Sample
bool ok = BFS.ScriptSettings.DeleteAllValues();

BFS.ScriptSettings.DeleteValue

Description Deletes the value with the given name.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
ClipboardFusionClipboardFusion: Coming Soon!
VoiceBotVoiceBot: Coming Soon!
Function
bool DeleteValue(string name);
Sample
bool ok = BFS.ScriptSettings.DeleteValue("My Encrypted Setting");

BFS.ScriptSettings.GetValueNames

Description Gets all the value names for all ScriptSetting values.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
string[] GetValueNames();
Sample
string[] names = GetValueNames();

BFS.ScriptSettings.ReadValue

Description Reads a setting value as a string from the given name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string ReadValue(string name);
Sample
string value = BFS.ScriptSettings.ReadValue("My Setting");

BFS.ScriptSettings.ReadValueBool

Description Reads a setting value as a bool from the given name.
Compatibility
DisplayFusionDisplayFusion: 7.3.2 and higher
ClipboardFusionClipboardFusion: 4.2 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
bool ReadValueBool(string name);
Sample
bool value = BFS.ScriptSettings.ReadValueBool("My Setting");

BFS.ScriptSettings.ReadValueEncrypted

Description Reads a setting value from the given name and decrypts it.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string ReadValueEncrypted(string name);
Sample
string value = BFS.ScriptSettings.ReadValueEncrypted("My Encrypted Setting");

BFS.ScriptSettings.ReadValueInt

Description Reads a setting value as an int from the given name.
Compatibility
DisplayFusionDisplayFusion: 7.3.2 and higher
ClipboardFusionClipboardFusion: 4.2 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
int ReadValueInt(string name);
Sample
int value = BFS.ScriptSettings.ReadValueInt("My Setting");

BFS.ScriptSettings.WriteValue

Description Writes a setting value as a string to the given name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool WriteValue(string name, string value);
Sample
bool ok = BFS.ScriptSettings.WriteValue("My Setting", "value goes here...");

BFS.ScriptSettings.WriteValueBool

Description Writes a setting value as a bool to the given name.
Compatibility
DisplayFusionDisplayFusion: 7.3.2 and higher
ClipboardFusionClipboardFusion: 4.2 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
bool WriteValueBool(string name, bool value);
Sample
bool ok = BFS.ScriptSettings.WriteValue("My Setting", true);

BFS.ScriptSettings.WriteValueEncrypted

Description Encrypts and writes a setting a value to the given name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool WriteValueEncrypted(string name, string value);
Sample
bool ok = BFS.ScriptSettings.WriteValueEncrypted("My Encrypted Setting", "value goes here...");

BFS.ScriptSettings.WriteValueInt

Description Writes a setting value as ant int to the given name.
Compatibility
DisplayFusionDisplayFusion: 7.3.2 and higher
ClipboardFusionClipboardFusion: 4.2 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
bool WriteValueInt(string name, int value);
Sample
bool ok = BFS.ScriptSettings.WriteValue("My Setting", 75);

BFS.Taskbar

Containts functions to deal with the Windows taskbar.

BFS.Taskbar.IsWindowsTaskbarAutoHideEnabled

Description This function returns true if the Windows taskbar is currently set to auto-hide.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsWindowsTaskbarAutoHideEnabled();
Sample
bool isAutoHidden = BFS.Taskbar.IsWindowsTaskbarAutoHideEnabled();

BFS.Taskbar.SetWindowsTaskbarAutoHide

Description This function allows you to enable or disable the Windows taskbar auto-hide.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetWindowsTaskbarAutoHide(bool isAutoHidden);
Sample
bool ok = BFS.Taskbar.SetWindowsTaskbarAutoHide(true); //Sets the Windows taskbar to auto-hide

BFS.Text

Contains functions to manipulate text strings.

BFS.Text.QueryIsMatch

Description Allows you to use the powerful TextQuery engine to match the given text to the given query.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
bool QueryIsMatch(string query, string text);
Sample
bool isMatch = BFS.Text.QueryIsMatch("test", "This is my test"); //this will return true because it matches TEST

BFS.Text.ScrubHtml

Description This function removes all html tags from a string, with an option to remove empty tags as well.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubHtml(string text, bool isIgnorningEmptyTags);
Sample
string text = BFS.Text.ScrubHtml("HTML text", true);

BFS.Text.ScrubLineBreaks

Description This function removes all line breaks from a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubLineBreaks(string text);
Sample
string text = BFS.Text.ScrubLineBreaks("My text");

BFS.Text.ScrubLineBreaksAfter

Description This function removes all line breaks from the end of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubLineBreaksAfter(string text);
Sample
string text = BFS.Text.ScrubLineBreaksAfter("My text");

BFS.Text.ScrubLineBreaksBefore

Description This function removes all line breaks at the beginning of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubLineBreaksBefore(string text);
Sample
string text = BFS.Text.ScrubLineBreaksBefore("My text");

BFS.Text.ScrubTabs

Description This function removes all tabs from a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubTabs(string text);
Sample
string text = BFS.Text.ScrubTabs("My text");

BFS.Text.ScrubTabsAfter

Description This function removes all tabs from the end of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubTabsAfter(string text);
Sample
string text = BFS.Text.ScrubTabsAfter("My text");

BFS.Text.ScrubTabsBefore

Description This function removes all tabs at the beginning of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubTabsBefore(string text);
Sample
string text = BFS.Text.ScrubTabsBefore("My text");

BFS.Text.ScrubWhitespace

Description This function removes all whitespace from a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubWhitespace(string text);
Sample
string text = BFS.Text.ScrubWhitespace("My text");

BFS.Text.ScrubWhitespaceAfter

Description This function removes all whitespace from the end of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubWhitespaceAfter(string text);
Sample
string text = BFS.Text.ScrubWhitespaceAfter("My text");

BFS.Text.ScrubWhitespaceBefore

Description This function removes all whitespace at the beginning of a string.
Compatibility
DisplayFusionDisplayFusion: 8.1.2 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
string ScrubWhitespaceBefore(string text);
Sample
string text = BFS.Text.ScrubWhitespaceBefore("My text");

BFS.Web

Contains functions related to web requests and the internet.

BFS.Web.GetDefaultBrowserExe

Description Returns the complete path and filename of the default web browser.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetDefaultBrowserExe();
Sample
string file = BFS.Web.GetDefaultBrowserExe();

BFS.Web.OpenUrl

Description Opens the given Url in the default web browser.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool OpenUrl(string url);
Sample
bool ok = BFS.Web.OpenUrl("http://www.binaryfortress.com");

BFS.Web.OpenUrlNewWindow

Description Opens the given Url in a new default web browser window and returns the new window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr OpenUrlNewWindow(string url);
Sample
IntPtr windowHandle = BFS.Web.OpenUrlNewWindow("http://www.binaryfortress.com");

BFS.Window

Contains functions to manipulate desktop windows.

BFS.Window.AddToWindowsTaskbar

Description This function adds the given window handle to the Windows taskbar as a taskbar item.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool AddToWindowsTaskbar(IntPtr windowHandle);
Sample
bool ok = BFS.Window.AddToWindowsTaskbar(windowHandle);

BFS.Window.BuildWindowDebug

Description Builds a helpful string of debug information aboout the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string BuildWindowDebug(IntPtr windowHandle);
Sample
string debug = BFS.Window.BuildWindowDebug(windowHandle);

BFS.Window.Close

Description Close the given window handle (kills the window).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Close(IntPtr windowHandle);
Sample
bool ok = BFS.Window.Close(windowHandle);

BFS.Window.DisableWindow

Description Disables the given window, this prevents the window from receiving input. Same as the WS_DISABLED style.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool DisableWindow(IntPtr windowHandle);
Sample
bool ok = BFS.Window.DisableWindow(windowHandle);

BFS.Window.EnableWindow

Description Enables the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
ClipboardFusionClipboardFusion: 3.1.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool EnableWindow(IntPtr windowHandle);
Sample
bool ok = BFS.Window.EnableWindow(windowHandle);

BFS.Window.Focus

Description Focus the given window handle (make it the top window).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Focus(IntPtr windowHandle);
Sample
bool ok = BFS.Window.Focus(windowHandle);

BFS.Window.GetAllWindowHandles

Description Gets an array of all the window handles for all applications.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr[] GetAllWindowHandles();
Sample
IntPtr[] handles = BFS.Window.GetAllWindowHandles();

BFS.Window.GetAlwaysOnTop

Description Returns true if the given window is always on top.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool GetAlwaysOnTop(IntPtr windowHandle);
Sample
bool alwaysOnTop = BFS.Window.GetAlwaysOnTop(windowHandle);

BFS.Window.GetBounds

Description Returns the window's bounds for the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
Rectangle GetBounds(IntPtr windowHandle);
Sample
Rectangle bounds = BFS.Window.GetBounds(windowHandle);

BFS.Window.GetChildWindowByClass

Description Gets the direct child window handle for a given parent window, by searching for the given class name.
Compatibility
DisplayFusionDisplayFusion: 8.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.0 and higher
Function
IntPtr GetChildWindowByClass(IntPtr windowHandleParent, string windowClass);
Sample
IntPtr windowHandle = GetChildWindowByClass(windowHandleParent, "myclass");

BFS.Window.GetClass

Description Gets the given window handle's window class name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetClass(IntPtr windowHandle);
Sample
string windowClass = BFS.Window.GetClass(windowHandle);

BFS.Window.GetClientRect

Description Returns the client area size (the area inside the window border) for the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
Rectangle GetClientRect(IntPtr windowHandle);
Sample
Rectangle client = BFS.Window.GetClientRect(windowHandle);

BFS.Window.GetFocusedWindow

Description Gets the currently focused window (the foreground window).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetFocusedWindow();
Sample
IntPtr windowHandle = BFS.Window.GetFocusedWindow();

BFS.Window.GetOwner

Description Returns the owner window's handle for the given window handle, if the given window handle has an owner.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetOwner(IntPtr windowHandle);
Sample
IntPtr handleOwner = BFS.Window.GetOwner(windowHandle);

BFS.Window.GetParent

Description Returns the parent window's handle for the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetParent(IntPtr windowHandle);
Sample
IntPtr handleParent = BFS.Window.GetParent(windowHandle);

BFS.Window.GetParentRoot

Description Returns the root parent window's handle for the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetParentRoot(IntPtr windowHandle);
Sample
IntPtr handleParentRoot = BFS.Window.GetParentRoot(windowHandle);

BFS.Window.GetText

Description Gets the given window handle's title text.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
string GetText(IntPtr windowHandle);
Sample
string text = BFS.Window.GetText(windowHandle);

BFS.Window.GetTransparency

Description Gets the given windows transparency percent, between 0% and 100%.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
decimal GetTransparency(IntPtr windowHandle);
Sample
decimal percent = BFS.Window.GetTransparency(windowHandle);

BFS.Window.GetVisibleAndMinimizedWindowHandles

Description Gets an array of all the visible window handles for all applications including windows that are minimized.
Compatibility
DisplayFusionDisplayFusion: 9.0 and higher
ClipboardFusionClipboardFusion: 5.0 and higher
VoiceBotVoiceBot: 3.1 and higher
Function
IntPtr[] GetVisibleAndMinimizedWindowHandles();
Sample
IntPtr[] handles = BFS.Window.GetVisibleAndMinimizedWindowHandles();

BFS.Window.GetVisibleWindowHandles

Description Gets an array of all the visible window handles for all applications excluding windows that are minimized.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr[] GetVisibleWindowHandles();
Sample
IntPtr[] handles = BFS.Window.GetVisibleWindowHandles();

BFS.Window.GetVisibleWindowHandlesByMonitor

Description Returns an array of visible window handles for the given monitorID. In this example, the visible windows on monitor #2 are returned.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
IntPtr[] GetVisibleWindowHandlesByMonitor(uint monitorID);
Sample
IntPtr[] windowHandles = BFS.Window.GetVisibleWindowHandlesByMonitor(2);

BFS.Window.GetWindowByClass

Description Searches through all desktop windows and returns the first one it finds with the given window class.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetWindowByClass(string windowClass);
Sample
IntPtr windowHandle = BFS.Window.GetWindowByClass("mywindowclass");

BFS.Window.GetWindowByText

Description Searches through all desktop windows and returns the first one it finds with the given window text. This method supports wildcards, like "*ends" or "*title*".
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetWindowByText(string windowText);
Sample
IntPtr windowHandle = BFS.Window.GetWindowByText("starts with*");

BFS.Window.GetWindowByTextExact

Description Searches through all desktop windows and returns the first one it finds with the given window text. This method does not support wildcards.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.2 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetWindowByTextExact(string windowText);
Sample
IntPtr windowHandle = BFS.Window.GetWindowByTextExact("my title text exactly");

BFS.Window.GetWindowProperty

Description Gets the IntPtr value associated with the given window handle and window property name.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr GetWindowProperty(IntPtr windowHandle, string propertyName);
Sample
IntPtr propertyValue = BFS.Window.GetWindowProperty(windowHandle, "MyProperty");

BFS.Window.GetWindowsByText

Description Searches through all desktop windows and returns a list of windows that match the given window text. This method supports wildcards, like "*ends" or "*title*".
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.2 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr[] GetWindowsByText(string windowText);
Sample
IntPtr[] windowHandles = BFS.Window.GetWindowsByText("starts with*");

BFS.Window.GetWindowsByTextExact

Description Searches through all desktop windows and returns a list of windows that match the given window text. This method does not support wildcards.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.2 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
IntPtr[] GetWindowsByTextExact(string windowText);
Sample
IntPtr[] windowHandles = BFS.Window.GetWindowsByTextExact("my window title");

BFS.Window.GetWindowStyle

Description Gets the window style for a given window.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
BFS.WindowEnum.WindowStyle GetWindowStyle(IntPtr windowHandle);
Sample
BFS.WindowEnum.WindowStyle windowStyle = BFS.Window.GetWindowStyle(windowHandle);

BFS.Window.GetWindowStyleEx

Description Gets the extended window style for a given window.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
BFS.WindowEnum.WindowStyleEx GetWindowStyleEx(IntPtr windowHandle);
Sample
BFS.WindowEnum.WindowStyleEx windowStyle = BFS.Window.GetWindowStyleEx(windowHandle);

BFS.Window.GetWindowUnderMouse

Description Gets the window handle for the window under the mouse cursor, or the desktop window handle if the cursor is over the desktop.
Compatibility
DisplayFusionDisplayFusion: 9.4 and higher
ClipboardFusionClipboardFusion: Coming Soon!
VoiceBotVoiceBot: Coming Soon!
Function
IntPtr GetWindowUnderMouse();
Sample
IntPtr windowHandle = BFS.Window.GetWindowUnderMouse();

BFS.Window.HasWindowStyle

Description Checks if the given window has a certain style set.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool HasWindowStyle(BFS.WindowEnum.WindowStyle windowStyle, IntPtr windowHandle);
Sample
bool ok = BFS.Window.HasWindowStyle(windowStyle, windowHandle);

BFS.Window.HasWindowStyleEx

Description Checks if the given window has a certain extended style set.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool HasWindowStyleEx(BFS.WindowEnum.WindowStyleEx windowStyleEx, IntPtr windowHandle);
Sample
bool ok = BFS.Window.HasWindowStyleEx(windowStyle, windowHandle);

BFS.Window.IsHung

Description Returns true if the given window handle is hung (not responding).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsHung(IntPtr windowHandle);
Sample
bool isHung = BFS.Window.IsHung(windowHandle);

BFS.Window.IsMaximized

Description Returns true if the given window handle is maximized.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsMaximized(IntPtr windowHandle);
Sample
bool isMaximized = BFS.Window.IsMaximized(windowHandle);

BFS.Window.IsMinimized

Description Returns true if the given window handle is minimized.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsMinimized(IntPtr windowHandle);
Sample
bool isMinimized = BFS.Window.IsMinimized(windowHandle);

BFS.Window.IsRestored

Description Returns true if the given window handle is restored (not minimized or maximized).
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool IsRestored(IntPtr windowHandle);
Sample
bool isRestored = BFS.Window.IsRestored(windowHandle);

BFS.Window.IsVisible

Description Returns true if the given window handle is visible.
Compatibility
DisplayFusionDisplayFusion: 9.2 and higher
ClipboardFusionClipboardFusion: 5.4 and higher
Function
bool IsVisible(IntPtr windowHandle);
Sample
bool isVisible = BFS.Window.IsVisible(windowHandle);

BFS.Window.IsWindowRolledUpToHat

Description Returns true if the given window handle is currently rolled up to a hat.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool IsWindowRolledUpToHat(IntPtr windowHandle);
Sample
bool isRolledUp = BFS.Window.IsWindowRolledUpToHat(windowHandle);

BFS.Window.IsWindowRolledUpToIcon

Description Returns true if the given window handle is currently rolled up to an icon.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool IsWindowRolledUpToIcon(IntPtr windowHandle);
Sample
bool isRolledUp = BFS.Window.IsWindowRolledUpToIcon(windowHandle);

BFS.Window.IsWindowRolledUpToTitleBar

Description Returns true if the given window handle is currently rolled up to the TitleBar only.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool IsWindowRolledUpToTitleBar(IntPtr windowHandle);
Sample
bool isRolledUp = BFS.Window.IsWindowRolledUpToTitleBar(windowHandle);

BFS.Window.Maximize

Description Maximizes the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Maximize(IntPtr windowHandle);
Sample
bool ok = BFS.Window.Maximize(windowHandle);

BFS.Window.Minimize

Description Minimizes the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Minimize(IntPtr windowHandle);
Sample
bool ok = BFS.Window.Minimize(windowHandle);

BFS.Window.MoveToBottomMonitorHalf

Description Move and resize the window to the bottom half of its current monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToBottomMonitorHalf(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToBottomMonitorHalf(windowHandle);

BFS.Window.MoveToCentreMonitor

Description Move the window to the centre of its current monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToCentreMonitor(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToCentreMonitor(windowHandle);

BFS.Window.MoveToLeftMonitorHalf

Description Move and resize the window to the left half its current monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToLeftMonitorHalf(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToLeftMonitorHalf(windowHandle);

BFS.Window.MoveToMonitor

Description Move the window to a specific monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToMonitor(uint monitorID, IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToMonitor(monitorID, windowHandle);

BFS.Window.MoveToMonitorMaximized

Description Move the window to a specific monitor and maximize it.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToMonitorMaximized(uint monitorID, IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToMonitorMaximized(monitorID, windowHandle);

BFS.Window.MoveToMonitorResized

Description Move the window the a specific monitor and resize it proportional to the new monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToMonitorResized(uint monitorID, IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToMonitorResized(monitorID, windowHandle);

BFS.Window.MoveToNextMonitor

Description Move the window to the next monitor to the right.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToNextMonitor(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToNextMonitor(windowHandle);

BFS.Window.MoveToNextMonitorMaximized

Description Move the window to the next monitor to the right and maximize it.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToNextMonitorMaximized(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToNextMonitorMaximized(windowHandle);

BFS.Window.MoveToNextMonitorResized

Description Move the window to the next monitor to the right and resize it proportional to the new monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToNextMonitorResized(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToNextMonitorResized(windowHandle);

BFS.Window.MoveToPreviousMonitor

Description Move the window to the next monitor to the left.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToPreviousMonitor(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToPreviousMonitor(windowHandle);

BFS.Window.MoveToPreviousMonitorMaximized

Description Move the window to the next monitor to the left and maximize it.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToPreviousMonitorMaximized(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToPreviousMonitorMaximized(windowHandle);

BFS.Window.MoveToPreviousMonitorResized

Description Move the window to the next monitor to the left and resize it proportional to the new monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToPreviousMonitorResized(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToPreviousMonitorResized(windowHandle);

BFS.Window.MoveToRightMonitorHalf

Description Move and resize the window to the right half of its current monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToRightMonitorHalf(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToRightMonitorHalf(windowHandle);

BFS.Window.MoveToTopMonitorHalf

Description Move and resize the window to the top half of its current monitor.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool MoveToTopMonitorHalf(IntPtr windowHandle);
Sample
bool ok = BFS.Window.MoveToTopMonitorHalf(windowHandle);

BFS.Window.RemoveFromWindowsTaskbar

Description This function removes the given window handle from the Windows taskbar.
Compatibility
DisplayFusionDisplayFusion: 7.2 and higher
ClipboardFusionClipboardFusion: 3.3 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool RemoveFromWindowsTaskbar(IntPtr windowHandle);
Sample
bool ok = BFS.Window.RemoveFromWindowsTaskbar(windowHandle);

BFS.Window.RemoveWindowHighlight

Description This function will remove any window highlighting, if it is enabled for this window.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool RemoveWindowHighlight(IntPtr windowHandle);
Sample
bool ok = BFS.Window.RemoveWindowHighlight(windowHandle);

BFS.Window.RemoveWindowProperty

Description Removes the given window property name from the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool RemoveWindowProperty(IntPtr windowHandle, string propertyName);
Sample
bool ok = BFS.Window.RemoveWindowProperty(windowHandle, "MyProperty");

BFS.Window.Restore

Description Restores the given window handle.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool Restore(IntPtr windowHandle);
Sample
bool ok = BFS.Window.Restore(windowHandle);

BFS.Window.RollupWindowToHat

Description Rollup the given window handle to a hat.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool RollupWindowToHat(IntPtr windowHandle);
Sample
bool ok = BFS.Window.RollupWindowToHat(windowHandle);

BFS.Window.RollupWindowToIcon

Description Rollup the given window handle to an icon.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool RollupWindowToIcon(IntPtr windowHandle);
Sample
bool ok = BFS.Window.RollupWindowToIcon(windowHandle);

BFS.Window.RollupWindowToTitleBar

Description Rollup the given window handle to only the TitleBar.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool RollupWindowToTitleBar(IntPtr windowHandle);
Sample
bool ok = BFS.Window.RollupWindowToTitleBar(windowHandle);

BFS.Window.SetAlwaysOnTop

Description Sets the given window to always on top or not on top.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetAlwaysOnTop(IntPtr windowHandle, bool alwaysOnTop);
Sample
bool ok = BFS.Window.SetAlwaysOnTop(windowHandle, true);

BFS.Window.SetLocation

Description Moves the given window to 200x300.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetLocation(IntPtr windowHandle, int x, int y);
Sample
bool ok = BFS.Window.SetLocation(windowHandle, 200, 300);

BFS.Window.SetOwner

Description Sets the given window handle's owner to WindowHandleOwner.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetOwner(IntPtr windowHandle, IntPtr windowHandleOwner);
Sample
bool ok = BFS.Window.SetOwner(windowHandle, windowHandleOwner);

BFS.Window.SetSize

Description Resizes the given window to 800x600.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetSize(IntPtr windowHandle, int width, int height);
Sample
bool ok = BFS.Window.SetSize(windowHandle, 800, 600);

BFS.Window.SetSizeAndLocation

Description Resizes the given window to 800x600 and moves it to 200x300.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetSizeAndLocation(IntPtr windowHandle, int x, int y, int width, int height);
Sample
bool ok = BFS.Window.SetSizeAndLocation(windowHandle, 200, 300, 800, 600);

BFS.Window.SetText

Description Sets the given window handle's title text.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetText(IntPtr windowHandle, string text);
Sample
bool ok = BFS.Window.SetText(windowHandle, text);

BFS.Window.SetTransparency

Description Sets the given windows transparency to 50%. Use values between 0 and 100 for the percent.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetTransparency(IntPtr windowHandle, decimal transparencyPercent);
Sample
bool ok = BFS.Window.SetTransparency(windowHandle, 50);

BFS.Window.SetWindowHighlight

Description This function will highlight the given window's border user the colour provided. If you pass Color.Transparent a colour picker dialog will be shown.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
Function
bool SetWindowHighlight(IntPtr windowHandle, Color colour);
Sample
bool ok = BFS.Window.SetWindowHighlight(windowHandle, Color.Red);

BFS.Window.SetWindowProperty

Description Sets the given window property value.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetWindowProperty(IntPtr windowHandle, string propertyName, IntPtr propertyValue);
Sample
bool ok = BFS.Window.SetWindowProperty(windowHandle, "MyProperty", new IntPtr(67, "7.0.0+")

BFS.Window.SetWindowStyle

Description Sets the given window to the given style.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetWindowStyle(BFS.WindowEnum.WindowStyle windowStyle, IntPtr windowHandle);
Sample
bool ok = BFS.Window.SetWindowStyle(windowStyle, windowHandle);

BFS.Window.SetWindowStyleEx

Description Sets the given window to the given extended style.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool SetWindowStyleEx(BFS.WindowEnum.WindowStyleEx windowStyleEx, IntPtr windowHandle);
Sample
bool ok = BFS.Window.SetWindowStyleEx(windowStyle, windowHandle);

BFS.Window.ShowDesktop

Description Hides all windows and shows the desktop. (same as pressing Win+D)
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool ShowDesktop(IntPtr windowHandle);
Sample
bool ok = BFS.Window.ShowDesktop();

BFS.Window.ToggleAlwaysOnTop

Description Toggles the given window between always on top and not on top.
Compatibility
DisplayFusionDisplayFusion: 7.0 and higher
ClipboardFusionClipboardFusion: 3.1 and higher
VoiceBotVoiceBot: 1.0 and higher
Function
bool ToggleAlwaysOnTop(IntPtr windowHandle);
Sample
bool ok = BFS.Window.ToggleAlwaysOnTop(windowHandle);

BFS.Window.UnrollWindowFromHat

Description Unroll the given window handle if it is currently rolled-up as a hat.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool UnrollWindowFromHat(IntPtr windowHandle);
Sample
bool ok = BFS.Window.UnrollWindowFromHat(windowHandle);

BFS.Window.UnrollWindowFromIcon

Description Unroll the given window handle if it is currently rolled-up as an icon.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool UnrollWindowFromIcon(IntPtr windowHandle);
Sample
bool ok = BFS.Window.UnrollWindowFromIcon(windowHandle);

BFS.Window.UnrollWindowFromTitleBar

Description Unroll the given window handle if it is currently rolled-up to the TitleBar only.
Compatibility
DisplayFusionDisplayFusion: 7.1 and higher
Function
bool UnrollWindowFromTitleBar(IntPtr windowHandle);
Sample
bool ok = BFS.Window.UnrollWindowFromTitleBar(windowHandle);