Roger,
Experimenta isto:
COBOL Código:
WORKING-STORAGE SECTION.
01 ScreenWidth PIC S9(9) COMP-5.
01 ScreenHeight PIC S9(9) COMP-5.
01 ScreenScale PIC S9(4) COMP-5.
PROCEDURE DIVISION.
* Specify the scale desired -
* Pixels in this example
MOVE 0 To ScreenScale
INVOKE MainForm "GetScreenSize" USING ScreenWidth ScreenHeight ScreenScale
As variáveis são:
ScreenWidth: Returns the width of the screen.
ScreenHeight: Returns the height of the screen.
ScaleMode: The units to be used. If omitted, PowerCOBOL uses the ScaleMode value. Use the values (with equivalent constants)
CODE Código:
0 – Pixels (POW-SCALEPIXELS)
1 - 1/100mm (POW-SCALEHIMETRIC)
2 - 1/1000inch (POW-SCALEHIENGLISH)
3 - 1/20Points (POW-SCALETWIPS)
Un Saludo,
Rui
Añadido despues de 8 minutos
Roger,
Se quiseres a área disponível:
COBOL Código:
Example:
WORKING-STORAGE SECTION.
01 ScreenLeft PIC S9(9) COMP-5.
01 ScreenTop PIC S9(9) COMP-5.
01 ScreenWidth PIC S9(9) COMP-5.
01 ScreenHeight PIC S9(9) COMP-5.
01 ScreenScale PIC S9(4) COMP-5.
PROCEDURE DIVISION.
* Specify the scale desired -
* Pixels in this example
MOVE 0 TO ScreenScale
INVOKE MainForm "GetWorkArea" USING ScreenLeft ScreenTop ScreenWidth
ScreenHeight ScreenScale
Acquires the dimensions of the available display area on the screen - the screen size, less areas occupied by the task bar(s). Uses the units defined in the ScaleMode parameter.
Saludos,
Rui
Marcadores