Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Focus window in bottom-right quadrant

Description
This script is intended to be used when you've arranged four windows into equal quadrants on the monitor, not using DisplayFusion monitor splits. Running this script will focus the window in the bottom-right quadrant.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
4d ago
Date Last Modified
4d ago

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run()
	{
		// Get the monitor work area
		Rectangle monitorWorkArea = BFS.Monitor.GetMonitorWorkAreaByMouseCursor();
		
		// Get the X,Y for the bottom-right quadrant
		int bottomRightX = monitorWorkArea.X + (monitorWorkArea.Width / 2) + 20;
		int bottomRightY = monitorWorkArea.Y + (monitorWorkArea.Height / 2) + 20;
		
		// Focus the window
		BFS.Window.Focus(BFS.Window.GetWindowAtPosition(bottomRightX, bottomRightY));
	}
}