Home > Language Reference > Classes > Control

GotFocus Event

Event raised when the control gains the focus.

Syntax

Public Event GotFocus()

Remarks

The GotFocus event is raised when the control gains the focus. This event is sent only if the application runs on a device that supports the one-handed navigation feature.

You'll typically handle this event from a user control, to draw the focus ring around the control when needed. For example:

Private Sub UserControl_GotFocus()
  DrawFocusRing hbFocusRingDefault
End Sub

The GotFocus event is raised by the control gaining the focus before the LostFocus event is raised by the control losing the focus. Also, the Focus property of the Form object is not updated yet at the time this event is processed.

For more information about supporting the 5-way navigator and the blue focus ring feature in your applications, please refer to the One handed navigation section in the Programmer's Guide.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0Only effective on devices with one-handed navigation enabled.