Compartilhar via


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

  • Anonymous
    October 23, 2006
    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

  • Anonymous
    October 26, 2006
    Thanks Eugenio! This is just our users were asking!