Home > Language Reference > Classes > UIComponent

PenDown Event

Event raised when the user touches an UI element with the stylus.

Syntax

Public Event PenDown(ByVal x As Integer, ByVal y As Integer)

ParameterDescription
xHorizontal stylus position, expressed in standard coordinates.
yVertical stylus position, expressed in standard coordinates.

Remarks

The PenDown event is raised when the user touches an UI element with the stylus. The x and y parameters indicate the coordinates of the stylus expressed in standard coordinates with respect to the top left corner of the element.

Having raised this event, the element "captures" the stylus events: all subsequent moves generate a PenMove event until the user releases the stylus, even if it moves outside the element area.

The system has to perform some actions before and after your code processes this event, and it may crash if the active form changed in the meanwhile. To avoid this, you should never open or close a form while processing this event. If you need to change the active form when the user taps a UI element, use its Click event if it is available, or use the PenUp event.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A