6 28 3 Example 2 Move Employees between Two Forms

Visual LANSA

6.28.3 Example 2: Move Employees between Two Forms

In this example employees are dragged from one form and dropped to another form.

This is the source form:

And this is the target form:

If the employees are dragged without holding the Ctrl key down, they are moved from the source to the target form. If the Ctrl key is held down, the employees are copied from the source form to the target form.

Cursors

To visually differentiate between the move and copy operations, this example users two cursor components. Therefore if you want to execute this example you need to create two components of type Cursor:

DD_CURMOV

This cursor will be displayed when you copy employees

DD_CURCPY

This cursor will be displayed when you move employees

When you create these components, you need to specify the name of an existing .cur file as the value of the FileName property. You should be able to find .cur files in your Windows directory. It does not matter what cursor image you choose.

To execute this example, you need Source for the DD_EMPPL Payload compiled in a reusable part, the two cursors mentioned in the previous section and the compiled Source for the Source Form and Source for the Target Form .

Execute the source form. The target form will be displayed automatically.