# GetActiveCtrl

int GetActiveCtrl (int panelHandle);

## Purpose

Obtains the ID of the active control on the specified panel.

The active control is the control that receives keyboard events when the panel is the active panel.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.

## Return Value

Name | Type | Description
controlID | integer | Returns the control ID of the active control. If the panel has no controls, GetActiveCtrl returns zero. GetActiveCtrl can return the following error code: –4—Panel, pop-up, menu bar, or plot ID is invalid.