Enter, Exit Events, ActiveControl Property Example
The following example uses the ActiveControl property in a subroutine that tracks the controls a user visits. The Enter event for each control calls the TraceFocus subroutine to identify the control that has the focus.
To use this example, copy this sample code to the Declarations portion of a form. Make sure that the form contains the following controls:
- A ScrollBar named ScrollBar1.
- A ListBox named ListBox1.
- Two OptionButton controls named OptionButton1 and OptionButton2.
- A Frame named Frame1.
|