HANDLE()

HANDLE(N)

RETURNS THE HANDLE OF THE SYSTEM OBJECT NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: System

ACTION

The function HANDLE(N) returns the handle of the system object designated by its number N.

The handle is the number given by the operating system (Windows) to an object.

The system object of type : type : ALPHA, PICTURE, DLIST, TIMER, SHAPE, SERIAL, LED1, DIGIT1, SWITCH1, IMAGE have no handle.

SYNTAX: Result=HANDLE(N)

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The function HANDLE() is used to know the handle of a system object, useful when calling a DLL function.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If the system object number N does not exist.
  • If the system object number N is not of type : type : ALPHA, PICTURE, DLIST, TIMER, SHAPE, SERIAL, LED1, DIGIT1, SWITCH1, IMAGE.

EXAMPLE

rem create a LIST

list 1

rem print its handle

print handle(1)

SEE ALSO

HANDLE_CANVAS()