1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

querybox & dual monitors

Discussion in 'Support' started by ron, Feb 28, 2011.

  1. ron

    ron

    Joined:
    Aug 19, 2008
    Messages:
    140
    Likes Received:
    0
    On my dual monitor setup, querybox does not position the dialog in the center of the TCC window.

    querybox /e "title" Press OK %%dlgid

    The TCC window is on my left (secondary) monitor. The dialog is displayed on the left edge of the primary monitor. The vertical component of the dialog is correct if you were to slide it over to the secondary monitor.

    Using msgbox...

    msgbox OK "title" Press OK

    works fine. Centers the dialog in the TCC window.

    TC 12.01.44
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    That's novel -- I never heard of anybody putting their primary monitor on the right!

    The window centering function thinks that the TCC window is off the screen (because the coordinates are < 0), soit's moving the popup window to the left edge (x=0). (And yes, this was deliberate because people were moving their TCC windows offscreen but wanting the popup windows to appear onscreen.)

    This function will have to get a lot more complicated to determine whether the offscreen location is really on a secondary monitor to the left (or above) the primary. I'll do something about it in the next build.
     
  3. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0
    My primary monitor is on the right, and my secondary is on the left. It's
    where the available desk space happened to be.

    On Mon, Feb 28, 2011 at 10:09, rconn <> wrote:




    --
    Jim Cook
    2010 Mondays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Tuesday.
     
  4. ron

    ron

    Joined:
    Aug 19, 2008
    Messages:
    140
    Likes Received:
    0
    Available desk space - my reason also. Turns out to be a good idea though because it revealed a few weak spots in our code that I was able to correct.

    But, as I write this, I just realized that I forgot to account for a secondary monitor on the right. I need a bigger office!

    So MSGBOX and QUERYBOX use different logic to position themselves?

    If people want to control where the popup appears, they should use /POS, right?
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    QUERYBOX always centers itself over the TCC window; MSGBOX does not.

    /POS will always put the popup where you want it.
     
  6. ron

    ron

    Joined:
    Aug 19, 2008
    Messages:
    140
    Likes Received:
    0
    Interesting. In my case - the example I gave - msgbox always appears centered over the TCC window, regardless of which monitor contained the TCC window.
     

Share This Page