question which control has focus.

G

Guest

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.
 
A

Ali Raza Shaikh

Hello

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

{

if (this.Controls.Focused==true)

{

// Anything u want to do

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top