Processing Ajax...
Save 25% on our desktop apps during our Black Friday/Cyber Monday sale!Save 25% on our desktop apps during our Black Friday/Cyber Monday sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save 25% on our desktop apps during our Black Friday/Cyber Monday sale!

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Enable/Disable Second Monitor (Laptops)

Description
This script will use the built-in Windows "DisplaySwitch.exe" commands to switch between using one display or two displays in extended mode.
Language
C#.net
Minimum Version
Created By
Holos
Contributors
-
Date Created
Jul 7, 2015
Date Last Modified
Jul 7, 2015

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
	{
		public static void Run()
			{	
				if (BFS.Monitor.GetMonitorIDs().Length > 1)
					{
						BFS.Application.Start("DisplaySwitch.exe", "/internal");
					}
				else
					{
						BFS.Application.Start("DisplaySwitch.exe", "/extend");
					}
			}
	}