How to always keep focus on a textbox?
-
I have a windows form which has several controls like buttons, listviews, labels and a textbox. Is there any generic way to always keep focus on that textbox?
Wow - let's see. You have buttons and listviews, and you never want any of them to get the focus ? how would that work ? I guess you could catch keypresses and always respond by focusing on the textbox.
Christian Graus Driven to the arms of OSX by Vista.
-
Wow - let's see. You have buttons and listviews, and you never want any of them to get the focus ? how would that work ? I guess you could catch keypresses and always respond by focusing on the textbox.
Christian Graus Driven to the arms of OSX by Vista.
-
What my point is here. As soon as other control's work is done, then the textbox should be focus. I dont want to put textbox1.focus in every control's lostfocus event. I hope you understand me. Thanks!
xbiplav wrote:
As soon as other control's work is done, then the textbox should be focus.
Then set is back to being focused. Control.Focus() method[^]
* Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.