Getting screen resolution

Hi

If I get the available screens like so

List<Item> screens = Configuration.Instance.GetItemsByKind(Kind.Screen);

Is it possible to get the screen resolutions?

I use the screen fqid to open a floating window and would need to know how big I can make the window.

You can find resolution in screen[i].Properties with keys Size.Width and Size.Height

Freddy

Hm, the only key in Properties is “Id”

You are right, you need to use Window Properties, like this part of code:

    MultiWindowCommandData data = new MultiWindowCommandData();

    List<Item> screens = Configuration.Instance.GetItemsByKind(Kind.Screen);

    if (screens != null && screens.Count > 0)

    {

      data.Screen = screens\[0\].FQID;

      List<Item> windows = Configuration.Instance.GetItemsByKind(Kind.Window);

      if (windows != null && windows.Count > 0)

      {

        //             // Calcoli per le Dimensioni della Floating Windows

        //             int \_width = DefWindowWidth, \_height = DefWindowHeight;

        Dictionary<string, string> prop = windows\[0\].Properties;

        if (prop.ContainsKey("Size.Width") && prop.ContainsKey("Size.Height"))

        {

          if (!int.TryParse(prop\["Size.Width"\], out \_width))

            \_width = DefWindowWidth;

          if (!int.TryParse(prop\["Size.Height"\], out \_height))

            \_height = DefWindowHeight;

        }

Freddy

But that looks like it will give me the size of a window that may or may not cover the entire screen.