question which control has focus.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    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.


  • Ali Raza Shaikh

    #2
    Re: question which control has focus.

    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

    }

    }



    <CobraStrikes@a l.com> wrote in message
    news:1136739629 .8718.0@ersa.uk .clara.net...[color=blue]
    > 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.
    >
    >[/color]


    Comment

    Working...