Difference between revisions of "Control.Handle"

From Xojo Documentation

 
Line 21: Line 21:
 
The following gets a handle to the control.
 
The following gets a handle to the control.
 
<rbcode>
 
<rbcode>
Dim i As Integer = Me.Handle
+
Var i As Integer = Me.Handle
 
</rbcode>
 
</rbcode>

Latest revision as of 17:35, 16 July 2019

Read-Only Property (As Integer )
IntegerValue = aControl.Handle

Supported for all project types and targets.

Returns a handle to the control.

Notes

For interfacing with Mac APIs using Declares, RectControl.Handle returns NSViews (except for Toolbar).

On Windows returns the HWND of the control.

On Linux it returns a GtkWidget.

Sample Code

The following gets a handle to the control.

Var i As Integer = Me.Handle