Skip to main content

[archive] Display window on second screen/monitor

  • January 11, 2005
  • 13 replies
  • 0 views

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS

13 replies

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
This is an interesting scenario indeed.
I just have to wonder if Windows understands the application as two physically different monitors or if the second monitor appears as an extension to the primary monitor.

I know for sure we haven't by design any support for this, however, I can see it is a nice feature, so I would suggest you check out with Tech support, possibly raise an enhancement request if you think this is important.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
The secondary screen seems to work as an extension to the primary screen. You can drag applications from left to right from the primary- to the secondary screen. Upon exit on our application we read the position of the window, from these coordinates we clearly read the secondary screen as an extension.
I'll follow up on this with tech support to see if it's a simple enhancement, since it's standard windows behavior.

As to the importentness, well - it's not exactly critical, but indeed a very nice feature.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
This forum is interesing. I have dual monitors set up on my developement system and just tried this senerio and it seems to work fine on my system. I wonder if it is something unique to the display card or something.

I currently save screen position (col and line) in the system registry and when the program is called it retrieves that information prior to the display window call.

The only thing I can think of that might be different in my situation is that I have Monitor 1 set up as the right display and monitor 2 as the left. I don't know it that makes any difference or not.

I am currently using Ati Drivers for the Radeon 7000 series display adapter.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
Interesting information sthoge.

A couple of clues in this aspect.

If you go to the display properties (right click desktop select properties) and then select the tab "Settings".

At least for my property page, there is a check box:

Extend my Windows desktop onto this monitor.

It is checked, perhaps is yours as well, and ekvello is not? Could that be the difference.

Another thing that I sensed as a difference here, but could not say for sure is that it appears you actually ask for the current window position at exit, store it, and reposition the window accordingly upon restart. While it appears to me that ekvello is expecting the runtime itself to do this, which it does not.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
That's strange.
The settings on the display are the same (the checkbox is checked) I've tested this on both 6.0 & 6.2 versions of the runtime.

I find it hard to believe that this is a hardware issue, since my Explorer-window behaves as expected - I drag it to my secondary monitor, close it, and it reopens in the secondary monitor.

Try the simple example code I've attached.
It just displays a small window in column 1300 & line 1
Does it work ok?

BTW, thanks for your replies!

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
ekvello,

I downloaded your program and ran it and the window displays on the right side monitor.

I could not find the check box that gforseth talked about on the display property window.

BTW, I'm running Windows 2000 Pro as the OS.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
I'm curious, do you both have dual video cards or a single video card with dual monitor support?

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
I have a single Video card with two monitors.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
I'm running this on two separate video cards with one monitor each. My OS is XP SE, that might also be the reason for you not finding that checkbox Gforseth mentioned.
The differences are narrowed down to OS and hardware now.
Been trying to get a hold of a computer with Win2000 installed that also has the ability to run two monitors. Not successful yet, will post the results of my efforts :-)

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
I believe there are differences in screen behavior when using a single video card, like ATI radeon with it's own dual monitor driver support, and using dual video cards with Windows dual monitor support. For instance, in the past I was unable to have MS Powerpoint display a presentation on the second monitor while controlling the slides from the first when I was using single ATI video card with dual monitors. I had to put two video cards in my Win2000 PC to get powerpoint to use both monitors correctly. It's an example of how differently implemented dual monitor support can affect software. BTW, this was about 3 years ago so newer versions of powerpoint may have been upgraded to work with both methods of dual monitor support.

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
We had a customer complain of this same problem, and I determined that the application window always shows up on the primary monitor when using dual video cards. I tested this inhouse, and found that on dual-head video cards, there was an option to remember where windows were the last time, and this made the application work properly, but when this setting was disabled, it did what was described to me on the dual card machine. This feature is part of the dual-head card's driver.

-Chris

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
I hate to bring back such an old topic, but if you set the "RESIZEABLE" attribute to TRUE on your window you can save the position to the second monitor and it will open up back on the same monitor. With the "RESIZABLE" attribute set to FALSE the window opens up on the first monitor smacked up against the right hand side... Go figure. It has nothing to do with single or dual video cards as far as I can tell.

Also on a side note this only works properly on INITIAL windows and FLOATING windows, INDEPENDENT windows seem to go only as far as the first monitor and stick to the right edge of it :-(

[Migrated content. Thread originally posted on 10 January 2005]

As a result of cheaper monitors, more and more of our customers are using 2 monitors side by side, to keep more information visible as they are working. Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure). The problem is when our application is on the second screen. The col and size value are saved and read correctly, but the display-statement refuses to draw the window outside the main screen.
Easy to reconstruct, just code a "screen col" at "display window"-statement larger than your primary screen.
No matter how high you set the "screen col" the window is drawn at the right side of the primary monitor.

Does anybody have any experience with this?
Probably a limitation in the runtime, but it's worth a try, since it's standard windows procedure.

Espen Kvello
DI Systemer AS
Hello everybody,

I'm quite new in the whole graphical COBOL programming. Now I'm looking exactly for the function Espen Kvello talked about:

Our systems save the position of the window when the user shuts down our applications, and re-opens them at that same saved position (standard window procedure).


I've searched the AcuCorp manuals for an idea but I haven't found a catchword. What's the name of the "standard window procedure" or where can I find a clue?

Thanks a lot for helping.
Greetings

Moritz Spickermann

EDIT:
I got it! :)