Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

OnTouchDelta

  • Last UpdatedOct 29, 2026
  • 2 minute read

Use the sub-routine OnTouchDelta in VBScript to perform an action each time the user manipulates the project screen or screen object.

Syntax

Sub OnTouchDelta(x,y,deltaX,deltaY,deltaScale,deltaExpansion,deltaRotation,cumulativeX,cumulativeY,cumulativeScale,cumulativeExpansion,cumulativeRotation,inertiaEnabled)

…

End Sub

x

The current x-coordinate (in pixels from the left of the screen) of the first touch point.

y

The current y-coordinate (in pixels from the top of the screen) of the first touch point.

deltaX

The change (in pixels) between the previous x-coordinate and the current x-coordinate of the first touch point.

deltaY

The change (in pixels) between the previous y-coordinate and the current y-coordinate of the first touch point.

deltaScale

The change (as a percentage) in the distance between the first and second touch points.

deltaExpansion

The change (in pixels) in the distance between the first and second touch points.

deltaRotation

The change in the angle of rotation (in radians) indicated by the first and second touch points.

cumulativeX

The total change (in pixels) between the starting x-coordinate and the current x-coordinate of the first touch point.

cumulativeY

The total change (in pixels) between the starting y-coordinate and the current y-coordinate of the first touch point.

cumulativeScale

The total change (as a percentage) in the distance between the first and second touch points, from the start of the manipulation.

cumulativeExpansion

The total change (in pixels) in the distance between the first and second touch points, from the start of the manipulation.

cumulativeRotation

The total change in the angle of rotation (in radians) indicated by the first and second touch points, from the start of the manipulation.

inertiaEnabled

A boolean value indicating whether inertia is enabled for the project screen or screen object.

Returned value

This is a sub-routine (as opposed to a function) in VBScript, so it does not return any value.

Notes

This sub-routine is based on the method ManipulationDelta in the Windows API. For more information, go to "Windows Touch Input" on the Microsoft Developer Network website at: msdn.microsoft.com/library/dd317321.aspx

The sub-routine is executed once for each discrete movement in the current manipulation. Changes in position require one touch point. Changes in size and/or rotation require two touch points.

You are not required to use the received parameters in your code. They simply make the raw touch input data available to you, for you to use (or not) as you deem necessary.

In This Topic
Related Links