PRB: SetFocus During Form Load May Cause Illegal Function Call (88477)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q88477 SUMMARYSymptoms
Using the SetFocus method to set the focus to a specific control on a
form during the form load event procedure may result in an "Illegal
Function Call" error.
Cause
This error occurs because the form that the control is on is not yet
visible.
Resolution
To prevent this error from occurring, execute Form.Show before executing
the SetFocus method.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbprb KB88477 |
---|
|