+ Reply to Thread
Results 1 to 1 of 1

User Form Startup Position

  1. #1
    Registered User
    Join Date
    London, England
    MS-Off Ver

    User Form Startup Position


    I've read a few samples on how to get a form to open central on the active window (active in my sense is the same window as Outlook, or other Office app is running), but it doesn't seem to work for me.

    For reference, we have a mixture of screen setup's where I work:

    Surface Pro's connected to a Surface Dock which in turn is connected to 1 or 2 external monitors. If 2, one can be portrait and the other landscape, or both landscape
    Traditional PCs with 1 or 2 external monitors. Again, if 2, one can be portrait and the other landscape, or both landscape

    There is no standard layout: the left or right can be either portrait on landscape, with the Surface some people have it as an active screen (to left, right or underneath) and some people have it disabled so just external monitors. With any setup, unless both are landscape the 'heights' of the monitors don't line up - I've attached an example (this is my personal Surface layout)

    If I Debug.Print these:

    (Application.ActiveWindow.Top + Application.ActiveWindow.Height / 2) - (Me.Height / 2)
    (Application.ActiveWindow.Left + Application.ActiveWindow.Width / 2) - (Me.Width / 2)

    this is what I get:

    Outlook maximised on Surface screen:


    Outlook maximized on landscape screen:


    Outlook maximized on portrait screen:


    I think this is where my problems arise?


    Last edited by ldoodle; 07-11-2018 at 06:36 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1