c# - Make a textbox always have focus -


possible duplicate:
setting external application focus

even know duplicate different language. pro. programer think easy not beginner. don't have knowledge vb.

i'm making application check money card. list details pertaining used , when. set 1 pc no keyboard , mouse, , automatically boot , shut down every day.

however, there 1 problem. example, have teamviewer , application i'm making. both programs start when windows boots. if application starts first, textbox within lose focus when teamviewer starts.

i've tried use topmost , showdialog, when application starts, textbox still loses focus.

any suggestions?

you can try use lostfocus event , "re-focus" textbox:

textbox.lostfocus += new eventhandler((s, e) => textbox.focus()); 

this doesn't work if form , parent controls aren't focused.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -