|Visual Basic (Usage)||Copy Code|
- Whether to move focus to the control
|Visual Basic||Copy Code|
Use this method to move the focus to or remove the focus from the control. Use the Focus method if you want to move the focus to the control and receive a return value whether moving the focus was successful.
You can check whether the control already has the focus using the Focused property.
For some controls, when the control receives the focus, if it can, the control can display a focus rectangle. Specify whether and how the focus rectangle appears by setting the DrawFocusRectangle property.
Some controls display a cursor when they receive the focus. Specify the position of the cursor by setting the EditModeCursorPosition property, if supported.