471,330 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

question which control has focus.

Hi All,
When a textbox loses focus is there a quick way to find out which control has received
the focus whilst in the textbox lostfocus/leave event ?

Many Thanks.
Jan 8 '06 #1
1 3475
Hello

I think one of the solution coulde be like this
for (int i=0; i<this.Controls.Count; i++)

{

if (this.Controls[i].Focused==true)

{

// Anything u want to do

}

}

<Co**********@al.com> wrote in message
news:11***************@ersa.uk.clara.net...
Hi All,
When a textbox loses focus is there a quick way to find out which
control has received
the focus whilst in the textbox lostfocus/leave event ?

Many Thanks.

Jan 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sammy | last post: by
1 post views Thread by Paul Tsai | last post: by
4 posts views Thread by starbuck | last post: by
6 posts views Thread by Mike | last post: by
1 post views Thread by clickon | last post: by
4 posts views Thread by Jon Slaughter | last post: by
1 post views Thread by inadsad | last post: by
2 posts views Thread by bobh | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.