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?

Move Window and Mouse Cursor to Next Monitor

Description
This script will move the focused window and mouse cursor to the next monitor.
Language
C#.net
Minimum Version
Created By
PabloMartinez
Contributors
-
Date Created
Jun 27, 2017
Date Last Modified
Jun 27, 2017

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		// Move focused window to next monitor
		BFS.Window.MoveToNextMonitor(windowHandle);
		
		// Get window bounds
		var wBounds = BFS.Window.GetBounds(windowHandle);
		
		// Move mouse to center of window
		BFS.Input.SetMousePosition(wBounds.Width / 2 + wBounds.X, wBounds.Height / 2 + wBounds.Y);
	}
}