Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.48 GetWorkArea Method

Description:

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.

Used in controls:

None.

Used in objects:

Form

Parameters:

VT_I4 - WorkAreaLeftS9(9) COMP-5

VT_I4 - WorkAreaTopS9(9) COMP-5

VT_I4 - WorkAreaWidthS9(9) COMP-5

VT_I4 - WorkAreaHeightS9(9) COMP-5

[VT_I2 - ScaleModeS9(4) COMP-5]

Description of Parameters:

WorkAreaLeft: Returns the position of the left side of the screen work area.

WorkAreaTop: Returns the position of the top side of the screen work area.

WorkAreaWidth: Returns the width of the screen work area.

WorkAreaHeight: Returns the height of the screen work area.

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 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

Backward compatibility
method name:

None.