How to control run out EXE into B Monitor

How to control run out EXE into B Monitor

Postby richard-service » Wed Dec 12, 2018 3: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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Re: How to control run out EXE into B Monitor

Postby richard-service » Wed Dec 12, 2018 8:20 am

Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to control run out EXE into B Monitor

Postby Otto » Wed Dec 12, 2018 1: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

Re: How to control run out EXE into B Monitor

Postby richard-service » Fri Dec 14, 2018 4: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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to control run out EXE into B Monitor

Postby Natter » Fri Dec 14, 2018 7: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
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: How to control run out EXE into B Monitor

Postby richard-service » Wed Dec 19, 2018 1: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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to control run out EXE into B Monitor

Postby nageswaragunupudi » Wed Dec 19, 2018 9: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: Select all  Expand view  RUN

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: Select all  Expand view  RUN

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: Select all  Expand view  RUN

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
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests