Declaration
HRESULT OnDevicePenEventHandler([in] long PadMode, [in] long SubMode, [in] long PenState, [in] long XPos, [in] long YPos, [in] long LParam);
Description
Event returns the coordinates of the press and release event from the pen. The event is only returned when the Pad is inside the Dialog Modus and it doesn´t return coordinates of the signature. The Event can be used to realize clickable elements like buttons, checkboxes, radiobuttons, dropboxes. This Event will only be triggert when you inside the SimpleDialog Mode.
Arguments
PadMode
mode | code | decription |
---|---|---|
DEFAULT_SIGN_MODE | 0 | default signature mode |
DOCUMENT_VIEW_MODE | 5 | Document view mode |
DOCUMENT_SIGN_MODE | 6 | sign in document mode |
SIMPEL_DIALOG | 14 | simple dialog mode |
SubMode
SubMode | code | The sub mode of the simple dialog mode |
---|---|---|
Idle mode | 0x00 | (MODE_PARAM_IDLE) |
Signing mode | 0x01: | (MODE_PARAM_SIGN) |
PenState
PenState | code | Description |
---|---|---|
simple dialog Pen up | 0 | |
Simpledialog pen down | 1 |
XPos - X coordinate of the pen
YPos - Y coordinate of the pen
LParam
Not used now
Sample
C#
// Register the Pen Event Handler which will trigger by pen-press and pen-release SigDev.OnDevicePenEventHandler += onDevicePenEventHandler; private void onDevicePenEventHandler(int PadMode, int SubMode, int PenState, int XPos, int YPos, int LParam) { // PenState 1 = Pressed-Event | PenState 0 = Release-Event int ButtonEventID = PenState; Dialog.Show("PenState: " + PenState + " | Parameter: " + XPos + "/" + YPos); }