none
Positioning new windows called from a add-in region RRS feed

  • Question

  •  Everyone here uses two monitors, and I noticed new windows forms are opening up on monitor 1 even though outlook is on monitor 2.

    I'd rather it opened up on top of where it was called from, on top of the outlook window.

    I open up a windows form from a button on a add-in e-mail region, what's the best way to position that new window?   (I have no issues with modal windows and there position using centerparent)

    I tried this and it works, but is this the best practice?

      WhatList whatTheList= new WhatList ();
                        whatTheList.StartPosition = FormStartPosition.Manual;                   
                        whatTheList.Top = Globals.ThisAddIn.Application.ActiveWindow().Top + 10;
                        whatTheList.Left = Globals.ThisAddIn.Application.ActiveWindow().Left + 10;
                        whatTheList.Show();


    Wednesday, February 13, 2013 6:58 PM

Answers