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?

Open Website in Default Web Browser and Full Screen on Specific Monitor

Description
This script will open the specified website in the default browser and full screen it on the specified monitor.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Apr 18, 2017
Date Last Modified
Apr 18, 2017

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		// Set your website and target monitor ID here
		string website = "https://www.displayfusion.com";
		uint targetMonitor = 2;
		
		// Open the website window
		IntPtr window = BFS.Web.OpenUrlNewWindow(website);
		
		// Move it to the specified monitor
		BFS.Window.MoveToMonitorMaximized(targetMonitor, window);

		// Full screen the window by giving it focus and sending the F11 key
		BFS.General.ThreadWait(250);
		BFS.Window.Focus(window);
		BFS.Input.SendKeys("{VK_122}");
	}
}