Processing Ajax...

Close Dialog


Close Dialog

Close Dialog

A recent AVG and Avast antivirus update is preventing DisplayFusion 9.9 from launching on some systems.
If you're running into this issue, please update to the latest DisplayFusion 10.0 Beta.

Move Only a Specific Window of an Application

This script is intended to be called from a Window Location rule. When Window Location detects a new window for an application that matches the rule, it will call this script to check the window title and move the window to the location specified in the script if the window title matches.
Minimum Version
Created By
Keith Lammers (BFS)
Date Created
May 8, 2015
Date Last Modified
May 8, 2015

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
	public static void Run(IntPtr windowHandle)
		// modify the windowTitleToMatch string below to specify the title of the window you want moved by the Window Location rule
        // modify the locationX and locationY int values below to set the location the window should be moved to if its window title matches
		string windowTitleToMatch = "BlobWindow";
        int locationX = 0;
        int locationY = 400;
		// get the title of the window detected by the Window Location rule
		string windowTitleActual = BFS.Window.GetText(windowHandle);

		// move the window if its title matches
		if (windowTitleActual.Contains(windowTitleToMatch))
				BFS.Window.SetLocation(windowHandle, 0, 400);