Displaying Frames in Dual Monitors

KMoody

Member
My users have dual monitors, and I'd like to display frames in their secondary monitors. How do I do this? Setting the frames' rows doesn't solve the problem.
 

RealHeavyDude

Well-Known Member
Do your users have Windows system to which the dual monitors are attached? As far as I know, in Windows you can extend or mirror the desktop to the second screen. Nevertheless, the ABL don't know nothing about the second display. You could try to position single GUI windows so that they end up on the extended part of the desktop ( the second screen ). Other than that I don't know any possibility.

Heavy Regards, RealHeavyDude.
 

tamhas

ProgressTalk.com Sponsor
One might want to ask why you would force the position instead of allowing the user to pick the position they want.
 

tamhas

ProgressTalk.com Sponsor
Friend ... or co-conspirator, depending on ones attitude to forcing things on users. :)
 

Cecil

19+ years progress programming and still learning.
One might want to ask why you would force the position instead of allowing the user to pick the position they want.

There my be a situation where for example you are developing a retail point of sale system. There would be the customer display using monitor 2 and the cashier/operator using monitor 1 which would be more of wizz-bang interface.

So whenever the POS application starts up there would be no need for dragging 'display frames' to the second monitor.
 

jongpau

Member
There my be a situation where for example you are developing a retail point of sale system. There would be the customer display using monitor 2 and the cashier/operator using monitor 1 which would be more of wizz-bang interface.

So whenever the POS application starts up there would be no need for dragging 'display frames' to the second monitor.

I had to do something similar - displaying a full-screen borderless OpenEdge window on a TV. Initially I just extended the Windows Desktop and set the X and Y of the OpenEdge Window to the top left coordinates of the extended screen. I had it set to the right of my main screen so I just set the x to 1920 and y to 0. I made the width and height of the window to the resolution of the tv screen (1920 x 1080) and used some code from OE Hive (http://www.oehive.org/node/403) to make the window borderless. Worked a treat, but when the secondary display wasn't where I expected or the resolution was different it would of course not work.

To get around this I used a few .Net library calls to work out what screens I have, where they are located and what the resolution of each is. Using that it does not matter where and what the resolution of the additional screen(s) is - you can always find one and put your window where it needs to be. Below is a code snippet on how to get all the list of screens. This only works in on Windows in OE10 and higher and you will have to add the appropriate .Net libraries to your assemblies.xml

Code:
  DEFINE VARIABLE vl_int      AS INTEGER                         NO-UNDO.
  DEFINE VARIABLE oScreenList AS "System.Windows.Forms.Screen[]" NO-UNDO.
  DEFINE VARIABLE oScreen     AS System.Windows.Forms.Screen     NO-UNDO.
  DEFINE VARIABLE vl_size     AS CHARACTER                       NO-UNDO.
 
  DEFINE TEMP-TABLE screens NO-UNDO
         FIELD screenID      AS INTEGER
         FIELD screenPrimary AS LOGICAL
         FIELD screenName    AS CHARACTER
         FIELD screenX       AS INTEGER
         FIELD screenY       AS INTEGER
         FIELD screenWidth   AS INTEGER
         FIELD screenHeight  AS INTEGER
         INDEX iDef IS PRIMARY UNIQUE screenID.

  oScreenList = System.Windows.Forms.Screen:AllScreens.

  DO vl_int = 0 TO oScreenList:LENGTH - 1:

    oScreen = CAST(oScreenList:GetValue(vl_int), System.Windows.Forms.Screen).

    ASSIGN vl_size = oScreen:workingArea:ToString()
           vl_size = REPLACE(vl_size,"~{","")
           vl_size = REPLACE(vl_size,"~}","").

    CREATE screens.
    ASSIGN screens.screenID      = vl_int
           screens.screenPrimary = oScreen:Primary
           screens.screenName    = oScreen:DeviceName
           screens.screenX       = INTEGER(ENTRY(2,ENTRY(1,vl_size),"="))
           screens.screenY       = INTEGER(ENTRY(2,ENTRY(2,vl_size),"="))
           screens.screenWidth   = INTEGER(ENTRY(2,ENTRY(3,vl_size),"="))
           screens.screenHeight  = INTEGER(ENTRY(2,ENTRY(4,vl_size),"=")).
 
  END. /* do vl_int */
 
Top