G
Guest
I need to be able to select a specific TextBox on a WindowsForms DialogBox to
receive the focus from within the Load method. I thought that it would be as
easy as calling the TextBox's Focus method. However, I found that the TextBox
couldn't accept the focus. The CanFocus method returns FALSE and the
CanSelect method returns TRUE.
This is a simple dialog box running under VS2005 RC. The dialog box does
have a default button handler for the OK button, but I don't think this has
anything to do with it. Why can't I set a specific TextBox to have the focus
from within Load?
receive the focus from within the Load method. I thought that it would be as
easy as calling the TextBox's Focus method. However, I found that the TextBox
couldn't accept the focus. The CanFocus method returns FALSE and the
CanSelect method returns TRUE.
This is a simple dialog box running under VS2005 RC. The dialog box does
have a default button handler for the OK button, but I don't think this has
anything to do with it. Why can't I set a specific TextBox to have the focus
from within Load?