Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.58 MoveForm Method

Description:

Moves the form to the specified position.

The units are those defined in the ScaleMode property of the form.

Used in controls:

None.

Used in objects:

Form

Parameters:

VT_I4 - LeftS9(9) COMP-5

VT_I4 - TopS9(9) COMP-5

[VT_I4 - WidthS9(9) COMP-5]

[VT_I4 - HeightS9(9) COMP-5]

Description of Parameters:

Left: The new horizontal position for the top left corner of the form.

Top: The new vertical position for the top left corner of the form.

Width: The new width for the form.

Height: The new height for the form.

If Width and Height parameters are omitted, the size of form is not changed.

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.
PROCEDURE DIVISION.
* Remember that values must be 
*  expressed in the current Scale 
*  Mode.
* Here we set the scale mode to 
*  pixels first
    MOVE 0 TO "ScaleMode" OF CmText1
* Use the optional ScreenWidth and 
*  ScreenHeight Parms to
*  resize the form as well		
    MOVE 10  TO ScreenLeft
    MOVE 20  TO ScreenTop
    MOVE 200 TO ScreenWidth
    MOVE 200 TO ScreenHeight
    INVOKE MainForm  "MoveForm"  
      USING ScreenLeft
            ScreenTop
            ScreenWidth 
            ScreenHeight 

Backward compatibility
method name:

Corresponds to setting a value to POW-POSITION.