CAB and Multimonitor applications


This is a frequent question, especially with customers that are building application that require huge screen real estate management (industrial control, etc).

If you are building such solutions, the Screen object is your friend.

For example, if you are using a WindowWorkspace (where each part will be displayed in a separate non-modal window), you can control where the views will appear with the WindowSmartPartInfo:

WindowSmartPartInfo wspi = new WindowSmartPartInfo();
wspi.Title = "A title for my view"
wspi.MinimizeBox = false;
wspi.MaximizeBox = false;
wspi.Width = 500;

//Quick test on Screen object

if (Screen.AllScreens.Length > 1)
{
     wspi.Location = new Point( Screen.AllScreens[1].Bounds.X,

                                                 Screen.AllScreens[1].Bounds.Y);
}

          WorkItem.Workspaces["Main"].Show(v, wspi);

Comments (2)
  1. Ran into this need. It’s interesting that not all dual/multi-screen drivers express the extra display area as more than one screen.

    We ended up going with more-or-less the first bit of code you describe, with a double-check on "probable resolution" to get around the above w/ ATI cards of a certain flavor.

    / Dave

  2. Thanks Eugenio!

    This is just our users were asking!

Comments are closed.

Skip to main content