Click here to Skip to main content
15,877,757 members
Home / Discussions / C#
   

C#

 
QuestionHaving Multiple Services in a single project Pin
M. J. Jaya Chitra5-Jul-07 0:15
M. J. Jaya Chitra5-Jul-07 0:15 
AnswerRe: Having Multiple Services in a single project Pin
kubben5-Jul-07 2:37
kubben5-Jul-07 2:37 
GeneralRe: Having Multiple Services in a single project Pin
M. J. Jaya Chitra5-Jul-07 2:58
M. J. Jaya Chitra5-Jul-07 2:58 
QuestionDiffrence between NHibernate and LinQ ? Pin
vytheese5-Jul-07 0:11
professionalvytheese5-Jul-07 0:11 
AnswerRe: Diffrence between NHibernate and LinQ ? Pin
Pete O'Hanlon5-Jul-07 0:45
mvePete O'Hanlon5-Jul-07 0:45 
Questionfocus on text boxes Pin
treah5-Jul-07 0:01
treah5-Jul-07 0:01 
AnswerRe: focus on text boxes Pin
ganti.r5-Jul-07 0:15
ganti.r5-Jul-07 0:15 
AnswerRe: focus on text boxes Pin
Martin#5-Jul-07 0:18
Martin#5-Jul-07 0:18 
Hello,

YEP!

Because you are calling the method Focus which setts the focus to the control.
You have to use the "Focused" property which returns a bool!
if(txtbox1.Focused)
{
...


Nicer would be to implement the "GotFocus" event for you textboxes.
There you can store the sender, that you know which textbox has the focus.

If you then inherit you own Textbox, which provides a string property "SoundLocation", which can be set during design or runtime, you wouldn't need a if statement (or switch) at all.

All the best,

Martin
GeneralRe: focus on text boxes Pin
treah5-Jul-07 20:22
treah5-Jul-07 20:22 
GeneralRe: focus on text boxes Pin
Martin#5-Jul-07 20:53
Martin#5-Jul-07 20:53 
Questionobject[] result Pin
Sk8tz4-Jul-07 23:00
professionalSk8tz4-Jul-07 23:00 
AnswerRe: object[] result Pin
originSH4-Jul-07 23:36
originSH4-Jul-07 23:36 
GeneralRe: object[] result Pin
Sk8tz4-Jul-07 23:41
professionalSk8tz4-Jul-07 23:41 
GeneralRe: object[] result Pin
originSH4-Jul-07 23:44
originSH4-Jul-07 23:44 
GeneralRe: object[] result Pin
Sk8tz4-Jul-07 23:47
professionalSk8tz4-Jul-07 23:47 
GeneralRe: object[] result Pin
originSH4-Jul-07 23:52
originSH4-Jul-07 23:52 
QuestionWebClient?? C#2005 Pin
bug_aonz4-Jul-07 22:47
bug_aonz4-Jul-07 22:47 
QuestionRemoving event handlers Pin
archies_san4-Jul-07 22:44
archies_san4-Jul-07 22:44 
AnswerRe: Removing event handlers Pin
Diana Fernandez4-Jul-07 23:19
Diana Fernandez4-Jul-07 23:19 
AnswerRe: Removing event handlers Pin
Martin#4-Jul-07 23:33
Martin#4-Jul-07 23:33 
GeneralRe: Removing event handlers Pin
archies_san5-Jul-07 20:21
archies_san5-Jul-07 20:21 
GeneralRe: Removing event handlers Pin
Martin#5-Jul-07 20:30
Martin#5-Jul-07 20:30 
AnswerRe: Removing event handlers Pin
Bekjong4-Jul-07 23:37
Bekjong4-Jul-07 23:37 
QuestionAnimated gifs Pin
pokabot4-Jul-07 21:48
pokabot4-Jul-07 21:48 
AnswerRe: Animated gifs Pin
Urs Enzler4-Jul-07 22:01
Urs Enzler4-Jul-07 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.