FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to control run out EXE into B Monitor
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
How to control run out EXE into B Monitor
Posted: Wed Dec 12, 2018 03:55 AM

Hi
I have Extended screen include two Monitor. Just call A Monitor and B Monitor.
I run my App and display into A Monitor.
My App call out EXE and want to dispaly this out EXE into B Monitor.
FWH any function or Windows API support it?

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How to control run out EXE into B Monitor
Posted: Wed Dec 12, 2018 08:20 AM
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: How to control run out EXE into B Monitor
Posted: Wed Dec 12, 2018 01:59 PM
Hello Richard,
I save the coordinates of the main window and store these in an INI-file.
The user positions the window where he prefers and the next time the window opens exectly at this position.
With this coordinates the window opens on my right monitor.
Best regards
Otto


[FensterxWinhotelWINHOTEL]
Top= 189
Left= 2177
Height= 951
Width= 3590
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How to control run out EXE into B Monitor
Posted: Fri Dec 14, 2018 04:32 PM
Otto wrote:Hello Richard,
I save the coordinates of the main window and store these in an INI-file.
The user positions the window where he prefers and the next time the window opens exectly at this position.
With this coordinates the window opens on my right monitor.
Best regards
Otto


[FensterxWinhotelWINHOTEL]
Top= 189
Left= 2177
Height= 951
Width= 3590


Hi Otto,

Thanks for your solution. I will try it later.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: How to control run out EXE into B Monitor
Posted: Fri Dec 14, 2018 07:57 PM

How do I know the resolution of the monitor I'm moving my window to ? If the monitors have different resolutions then I will need to resize the app window

Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How to control run out EXE into B Monitor
Posted: Wed Dec 19, 2018 01:23 AM
Otto wrote:Hello Richard,
I save the coordinates of the main window and store these in an INI-file.
The user positions the window where he prefers and the next time the window opens exectly at this position.
With this coordinates the window opens on my right monitor.
Best regards
Otto


[FensterxWinhotelWINHOTEL]
Top= 189
Left= 2177
Height= 951
Width= 3590


Hi Otto,

How to know B Monitor Resolution?
Because I know A Monitor Resolution. when run App to B Monitor, Only get A Monitor Resolution.
Thank you.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to control run out EXE into B Monitor
Posted: Wed Dec 19, 2018 09:08 AM
How to know B Monitor Resolution?

Please see

https://docs.microsoft.com/en-us/window ... y-monitors
https://docs.microsoft.com/en-us/window ... -functions

You need to develop your own functions for this.

Instead, FWH 18.12 is coming up with complete functionality for programming with multiple monitors.
Eg:
Code (fw): Select all Collapse
nMonitors := FW_ActiveMonitors()
oMonitor := FW_GetMonitor( 2 )
? oMonitor:nLeft, oMonitor:nWidth, etc.
// and a lot more


Right now, you can activate a window on second monitor in a simple way:
Code (fw): Select all Collapse
DEFINE WINDOW oWnd ...
ACTIVATE WINDOW oWnd ON INIT oWnd:Move( nil, oWnd:nLeft + ScreenWidth(), nil, nil, .t. )


A simple way to know the width of the second monitor is
Code (fw): Select all Collapse
nWidth2 := GetSysMetrics( 78 ) - ScreenWidth()
? GetSysMetrics( 79 ) // --> Maximum of the heights of 1st and 2nd monitors

This works when you have only 2 monitors.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion