Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.47 GetScreenSize Method

Description:

Acquires the dimensions of the screen in the units defined in the ScaleMode parameter.

Used in controls:

None.

Used in objects:

Form

Parameters:

VT_I4 - ScreenWidthS9(9) COMP-5

VT_I4 - ScreenHeightS9(9) COMP-5

[VT_I2 - ScaleModeS9(4) COMP-5]

Description of Parameters:

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 property value. Use the values (with equivalent constants)
0 - Pixels(POW-SCALEPIXELS)
1 - 1/100mm(POW-SCALEHIMETRIC)
2 - 1/1000inch(POW-SCALEHIENGLISH)
3 - 1/20Points (POW-SCALETWIPS)

Return value:

None.

Example:

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

Backward compatibility
method name:

GETSCREENSIZE

Backward compatibility
arguments:

A group item having the following elementary items.
1.S9(4) COMP-5
2.S9(4) COMP-5