A form has focus, not an application. You could check if any form in the
application has focus. You would do such by looping over forms in your app
and checking the Focused proprerty. You would do something like this:
bool flag = false;
foreach (Form f in Application.OpenForms)
{
flag = flag | f.Focused;
}
I hope this helps.
> Is there a way to check with windows in c# whether the current application
> is in focus and taking input? I've tried checking the focused property on
> the main form, but this doesn't seem to work.
>
> Thanks
> RobP
RobP - 24 Mar 2008 13:35 GMT
> A form has focus, not an application. You could check if any form in the
> application has focus. You would do such by looping over forms in your
[quoted text clipped - 8 lines]
>
> I hope this helps.
Thanks! I will give this a go.
Regards
RobP