Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
CloudShow Manager
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
TrayStatus
VoiceBot
WallpaperFusion
Display
Fusion
by Binary Fortress Software
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
Features
Free vs Pro
More
Screenshots
Scripted Functions (Macros)
Languages
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Purchase
Login / Register
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Open 3 Websites Side by Side on Monitor 1
Return to DisplayFusion Scripted Functions (Macros)
Description
This script will open the 3 URLs specified at the top of the script tiled on the monitor specified in the script.
Language
C#.net
Minimum Version
9.6.1+
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Jan 14, 2020
Date Last Modified
Jan 14, 2020
Scripted Function (Macro) Code
Copy
Select All
using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { // Set the list of websites here string[] websiteURLs = { "https://www.displayfusion.com", "https://www.traystatus.com", "https://www.logfusion.ca" }; // Set the target monitor ID here uint monitorID = 1; // Get the monitor bounds Rectangle monitorBounds = BFS.Monitor.GetMonitorWorkAreaByID(monitorID); // Open each browser window and position it for (int i = 0; i < 3; i++) { // Set up the window y, width, and heigh values Rectangle windowBounds = new Rectangle(); int windowWidth = (int)(monitorBounds.Width / 3); windowBounds.Y = monitorBounds.Y; windowBounds.Width = windowWidth; windowBounds.Height = monitorBounds.Height; // Open the window IntPtr window = BFS.Web.OpenUrlNewWindow(websiteURLs[i]); // Modify the X value depending on where we are in the loop and move the window if (i == 0) { windowBounds.X = monitorBounds.X; BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height); } else if (i == 1) { windowBounds.X = monitorBounds.X + windowWidth; BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height); } else if (i == 2) { windowBounds.X = monitorBounds.X + (windowWidth * 2); BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height); } } } }