Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Two monitors

I reported this a while back, I think on one of the OI beta forums.

If am using an OI window that has an mdi frame. If I then extend that Window over two monitors then the mdi frame is not sized to cover both monitors. It looks like it's fixed at the size of the monitor on which the window was opened.

Any fixes or solutions?

Comments

  • Jim,

    I don't have a magic bullet for this, but I do want to get some clarity. Are you unable to stretch the MDI Frame when it is in resizable mode or are you simply saying that when you maximize the form it won't stretch? I was able to stretch my MDI Frame across two monitors, although the MDI Client does not extend beyond the size of the primary monitor. My guess is that could be fixed with a programmatic workaround.
  • When I change the form to cover two monitors the mdi frame does not fill the form it size remains fixed at the size of the primary monitor.
  • Jim,

    Is this something you are starting in design mode or just during runtime?
  • Your comment made me think why don't I just change the size.

    This fixes the problem on my machine.

    EQU SizeDiff To 28
    ! get mdiframe size
    MdiSize = Get_Property("MAIN_TACTIC.MDICLIENT", "SIZE")
    ! get main window size
    MainSize = Get_Property("MAIN_TACTIC", "SIZE")
    ! if difference is not 28, resize. Note I calculated 28 using my Windows installation.
    If MainSize<3> - MdiSize<3> # SizeDiff Then
    MdiSize<3> = MainSize<3> - SizeDiff
    Call Set_Property("MAIN_TACTIC.MDICLIENT", "SIZE", MdiSize)
    End

    But SizeDiff probably varies from OS to OS and Theme to Theme. Anyone have any ideas how to calculate SizeDiff?
  • size of (window frame x 2) + (6*2) always have a six pizel border between mdi frame and edge of main window
    SizeDiff = (GetSystemMetrics(SM_CXSIZEFRAME$) *2) + 12

    but by using CLIENTSIZE it's not needed. The following works

    Declare Function Get_Property
    MdiSize = Get_Property("MAIN_TACTIC.MDICLIENT", "SIZE")
    MainClientSize = Get_Property("MAIN_TACTIC", "CLIENTSIZE")
    6 pixels between edge of mdiframe and main window edge
    If MainClientSize<1> - MdiSize<3> # 12 Then
    MdiSize<3> = MainClientSize<1> - 12
    Call Set_Property("MAIN_TACTIC.MDICLIENT", "SIZE", MdiSize)
    End
  • Jim, I have been away for a while so I was unable to get back to you on this. I also see that have been cross posting your questions on the Rev site.

    FWIW, we are not averse to posting on the Rev site nor are we trying to replace the Rev forum with this site. There is way too much history and community membership on the Rev site for it to ever go away.

    However, we do find the process to log in and use their forum rather tedious. I find our site far more user friendly and functional. That being said, I would prefer to know if you are getting input from people on the Rev site (such as from Sprezz) just so I know when you are getting helpful responses. You could post the URL to your posts on the Rev site in your questions here. That would make it a little easier for me (or anybody else) to do a quick check and make sure we are not duplicating an answer you already received.

    I am glad you found a workaround. This is essentially what we have done with the SRP Editor. We discovered other related issues with the way OI handles form sizing. We have needed to use code to force the size and positions of our controls. PITA for sure...
Sign In or Register to comment.