hi,
i have a MDI-Form. Now I want to find out, which control (Textbox, Textfield) currently has got the focus. these controls may be in a TabControl or another UserControl.
bye
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sunnyPosted Nov 26, 2005, 3:33 AM
so u have a mdi form and child forms in it and u want to know which control is focused on the child form?
well u have to run an foreach loop of arrays of forms and them a foreach loop for every contol in the form..
Please make any corrections because i am too tired and sick. i cannot refer to visual studion to provide u the 100% correct code
something like this..
Any thing i have replaced by ' ' is not exactly correct
foreach(Form form in 'mdiForm.ChildForms')
{
foreach(Control ctrl in form.Controls)
{
if(ctrl.focused==true)
{
//What to do if a focused control is found?
}
}
}
i hope this helps u.