Graphics.Handle

From Xojo Documentation

Read-Only Property (As Ptr )
PtrValue = aGraphics.Handle(Type as Graphics.HandleTypes)

Supported for all project types and targets.

Gets the OS Handle for the passed Type. Pass the appropriate Graphics.HandleTypes value to specify the Type.

Notes

Handle will return nil if the requested handle type is not available or is not supported.

Sample Code

This code gets a handle to the port of the Graphics object on Mac.

Var h As Ptr
h = g.Handle(Graphics.HandleTypes.CGContextRef)