{ "name": "Move Window to \"Second\" Monitor and Run a Function", "language": 0, "code": "using System;\r\nusing System.Drawing;\r\n\r\npublic static class DisplayFusionFunction\r\n{\r\n\tpublic static void Run(IntPtr windowHandle)\r\n\t{\r\n\t\t// Set the function name that you want to run here\r\n\t\tstring customFunction = \"Custom Function Name\";\r\n\t\t\r\n\t\t// Find the \"second\" monitor (the non-primary monitor) and move the window to it\r\n\t\tforeach (uint monitor in BFS.Monitor.GetMonitorIDs())\r\n\t\t{\r\n if (!(monitor == BFS.Monitor.GetPrimaryMonitorID()))\r\n {\r\n BFS.Window.MoveToMonitor(monitor, windowHandle);\r\n }\r\n\t\t}\r\n\t\t\r\n\t\t// Run the Custom Function on the window\r\n\t\tBFS.DisplayFusion.RunFunctionWithWindowHandle(customFunction, windowHandle);\t\t\r\n\t}\r\n}", "description": "", "references": "System.Core.dll|System.Data.dll|System.dll|System.Drawing.dll|System.Management.dll|System.Web.dll|System.Windows.Forms.dll|System.Xml.dll" }