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?

Confirm

Are you sure?

User Image
IanWaa
2 discussion posts
So I'm got a work setup where I ame working in the office with 2 monitors and on site with one.
I use quite a few TitleBar Buttons and would like to enable/disable them depending on how many monitors I have set up.

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
       
        // Gets the number of monitors and if it equals 2, loads the monitor profile    
        int numberOfMonitors = BFS.Monitor.GetMonitorCountEnabledAndDisabled();        
        if (numberOfMonitors == 2)
        {

and then it would enable/disable the titelbar button?

hope somebody could help me
Oct 12, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Are you wanting to enable/disable specific titlebar buttons, or enable/disable all titlebar buttons?
Oct 15, 2019  • #2
User Image
IanWaa
2 discussion posts
I mean if I can enable/disable specific it would be nice but I'll also be happy with doing all.
Oct 15, 2019  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
It's not possible to toggle specific ones, but I've uploaded a Scripted Function to the repository that will toggle the TitleBar Buttons feature depending on the number of connected monitors:

https://www.displayfusion.com/ScriptedFunctions/View/?ID=4b9a1683-46b6-4b9d-85a9-2e0c0d4f544b

Hope that helps!
Oct 16, 2019  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)