Highlighted
Absent Member.
Absent Member.
2901 views

[archive] Display window on second screen/monitor

[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
0 Likes
13 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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!
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

I'm curious, do you both have dual video cards or a single video card with dual monitor support?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

I have a single Video card with two monitors.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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 🙂
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Display window on second screen/monitor

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
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.