I've made little test with:
GetDesktopHeight() and GetDesktopWidth()
These functions always return parameters of first monitor - witdh=1280 and height=1024.
When I drag application to second monitor, these functions still return parameters of first monitor.
I've defined main window at 0,1281 and app runs on second screen. But - it still reports parameters (desktop width and heigth) from first - smaller display.
WINDOW ON A SECOND MONITOR ?
Moderator: Rathinagiri
Re: WINDOW ON A SECOND MONITOR ?
Hola Mol
Como es tu configuracion para la salida de los monitores ?, porque siempre me lo despliega en el primero.
Solo aparece si yo lo muevo manualmente.
---------------------------------------------------------------------------------------------------------------------
Hello Mol
As your output settings for the monitors?, Because I always displays it in the first.
Displayed only when I move it manually.
Como es tu configuracion para la salida de los monitores ?, porque siempre me lo despliega en el primero.
Solo aparece si yo lo muevo manualmente.
---------------------------------------------------------------------------------------------------------------------
Hello Mol
As your output settings for the monitors?, Because I always displays it in the first.
Displayed only when I move it manually.
Code: Select all
#include <hmg.ch>
Function Main()
nAnch := GetDesktopWidth()
nAlto := GetDesktopHeight()
DEFINE WINDOW FORM_1 AT 0,1370 WIDTH 1024 HEIGHT 500 MAIN TITLE "PANTALLA 1" BACKCOLOR WHITE
@ 10,10 LABEL L1 VALUE STR( nAnch ) + " / " + STR( nAlto ) WIDTH 200 HEIGHT 20 FONT "Verdana" SIZE 12
@ 50,10 BUTTON B1 CAPTION '&Mon2' WIDTH 060 HEIGHT 25 FONT "Arial" SIZE 09 ACTION Monitor2() TOOLTIP "Despliga Monitor 2"
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil
Function Monitor2()
DEFINE WINDOW FORM_2 AT 0,1500 WIDTH 1024 HEIGHT 500 TITLE "PANTALLA 2" BACKCOLOR BLUE
@ 10,10 LABEL L2 VALUE STR( nAnch ) + " / " + STR( nAlto ) WIDTH 200 HEIGHT 20 FONT "Verdana" SIZE 12
END WINDOW
CENTER WINDOW Form_2
ACTIVATE WINDOW Form_2
Return Nil
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: WINDOW ON A SECOND MONITOR ?
Quitando la siguiente linea, lo despliega en el segundo monitor...
----------------------------------------------------------------------------------------
By removing the following line is displayed on the second monitor ...
YES !
----------------------------------------------------------------------------------------
By removing the following line is displayed on the second monitor ...
CENTER WINDOW Form_1
YES !
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: WINDOW ON A SECOND MONITOR ?
See:
Code: Select all
#define SM_XVIRTUALSCREEN 76 // The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display monitors.
#define SM_YVIRTUALSCREEN 77 // The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors.
#define SM_CXVIRTUALSCREEN 78 // The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors.
#define SM_CYVIRTUALSCREEN 79 // The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors.
#define SM_CMONITORS 80 // The number of display monitors on a desktop.
nValue := GetSystemMetrics ( nIndex )
Re: WINDOW ON A SECOND MONITOR ?
Gracias por la info Dr. Claudio
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
WINDOW ON A SECOND MONITOR ?
Que bueno !
Quien sabe: SABE !
Gracias Claudio por tus aportes !
Quien sabe: SABE !
Gracias Claudio por tus aportes !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein