Highlighted
Respected Contributor.
Respected Contributor.
1154 views

Dialog System

Jump to solution

-  How to position a current window at the same x and y coordinates position as my previews window but whereby the two are not parent-child windows and belong to different screensets.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Dialog System

Jump to solution
See Dialog System Help searching 'dsmovsz':

Dsmovsz Example
This example moves two windows, win1 and win2, down and to the right.

@MOVE
MOVE "movr" DSMOVSZ-FUNCTION(1)
MOVE 2 DSMOVSZ-HANDLE-COUNT(1)
MOVE 100 DSMOVSZ-X(1)
MOVE 200 DSMOVSZ-Y(1)
MOVE-OBJECT-HANDLE WIN1 DSMOVSZ-WINDOW-HANDLE(1)
MOVE-OBJECT-HANDLE WIN2 DSMOVSZ-WINDOW-HANDLE(2)
CLEAR-CALLOUT-PARAMETERS $NULL
CALLOUT-PARAMETER 1 DSMOVSZ-PARAMETER-BLOCK $NULL
CALLOUT-PARAMETER 2 DSMOVSZ-HANDLES $NULL
CALLOUT "dsmovsz" 0 $PARMLIST

DSMOVSZ-FUNCTION: (partial)
Mova Move a window or dialog box to an absolute position.
Movp Move a window or dialog box relative to the position of their parents.
Movr Move a window or dialog box by a specified distance.

Qpa Get the current absolute position of a specified window or dialog box.

View solution in original post

0 Likes
6 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Dialog System

Jump to solution
See Dialog System Help searching 'dsmovsz':

Dsmovsz Example
This example moves two windows, win1 and win2, down and to the right.

@MOVE
MOVE "movr" DSMOVSZ-FUNCTION(1)
MOVE 2 DSMOVSZ-HANDLE-COUNT(1)
MOVE 100 DSMOVSZ-X(1)
MOVE 200 DSMOVSZ-Y(1)
MOVE-OBJECT-HANDLE WIN1 DSMOVSZ-WINDOW-HANDLE(1)
MOVE-OBJECT-HANDLE WIN2 DSMOVSZ-WINDOW-HANDLE(2)
CLEAR-CALLOUT-PARAMETERS $NULL
CALLOUT-PARAMETER 1 DSMOVSZ-PARAMETER-BLOCK $NULL
CALLOUT-PARAMETER 2 DSMOVSZ-HANDLES $NULL
CALLOUT "dsmovsz" 0 $PARMLIST

DSMOVSZ-FUNCTION: (partial)
Mova Move a window or dialog box to an absolute position.
Movp Move a window or dialog box relative to the position of their parents.
Movr Move a window or dialog box by a specified distance.

Qpa Get the current absolute position of a specified window or dialog box.

View solution in original post

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: Dialog System

Jump to solution
Hi,

I saw this in the Dialog System sample programs. This example moves windows that are withing the same screenset. I am trying to move a window to the position of a previous windows that belongs to a different screenset.
0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Dialog System

Jump to solution
Use DSMOVSZ-FUNCTION 'Qpa' with screenset1 to get the current window position in fields DSMOVESZ-X and DSMOVESZ-Y. Use this fields with screenset2 and DSMOVSZ-FUNCTION 'Mova' to set the position.
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: Dialog System

Jump to solution
Hi,

I will give this a try. However, I think I first need the following code:

DSMOVSZ-PARAMETER-BLOCK 1
DSMOVSZ-FUNCTION X 4.0
DSMOVSZ-RETURN C 2.0
DSMOVSZ-HANDLE-COUNT C 4.0
DSMOVSZ-X S 4.0
DSMOVSZ-Y S 4.0

The help suggests that I import this data definition from the dsext.dsl object library but can I just simply type it in my data block definition or does it have to be imported from the object library?
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: Dialog System

Jump to solution
Here is my code for the first screen set:

Global Definition:

SCREENSET-INITIALIZED
MOVE "qpr" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK
ESC
RETC
CLOSED-WINDOW
SET-FLAG CLOSE-WINDOW-FLAG
RETC

Data Block Definition:

CLOSE-WINDOW-FLAG 9 1.0
CR-FLAG 9 1.0
END-FLAG 9 1.0
DSMOVSZ-PARAMETER-BLOCK 1
DSMOVSZ-FUNCTION X 4.0
DSMOVSZ-RETURN C 2.0
DSMOVSZ-HANDLE-COUNT C 4.0
DSMOVSZ-X S 4.0
DSMOVSZ-Y S 4.0

**********************************************************************
Here is my code for the second screen set:

Global definition:

SCREENSET-INITIALIZED
SET-COLOR D-LOGON-SIGN-ON "BLACK" "WHITE"
SET-FOCUS D-LOGON-SIGN-ON
MOVE "mova" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK
ESC
RETC
CLOSED-WINDOW
SET-FLAG CLOSE-WINDOW-FLAG
RETC

Data Block definition:


CLOSE-WINDOW-FLAG 9 1.0
END-FLAG 9 1.0
CR-FLAG 9 1.0
*****dsmovesz definition*******************
DSMOVSZ-PARAMETER-BLOCK 1
DSMOVSZ-FUNCTION X 4.0
DSMOVSZ-RETURN C 2.0
DSMOVSZ-HANDLE-COUNT C 4.0
DSMOVSZ-X S 4.0
DSMOVSZ-Y S 4.0





Is this correct?
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

RE: Dialog System

Jump to solution
This problem has been resolved. Thanks for the input.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.