input focus

  • Thread starter =?ISO-8859-1?Q?M=E9sz=E1ros_Tam=E1s?=
  • Start date
?

=?ISO-8859-1?Q?M=E9sz=E1ros_Tam=E1s?=

Hi all,

how can i get the active control (which has the input focus) in an other
application? I have the handle of the active window, but I can't reach
the active control.

Any idea?

Thanks,

Tamas Meszaros
 
V

VJ

If you have a Form... then, this.ActiveControl(), will give you the
ActiveControl in the form.
 
?

=?ISO-8859-1?Q?M=E9sz=E1ros_Tam=E1s?=

But this isn't my app, the target application is for example a browser,
and I only have an IntPtr handle from this application. Can I get its
active control as well?

Tamas
 
V

VJ

this valid for only Windows Forms... if you are using external executables..
then I belivie you can achivie using Reflections (System.Reflection
namespace), I don't have a sample of hand... did u try google?

VJ
 

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

Similar Threads

unhide window 8
send copy message 1
Brakepoints 1
required memory 1
unhide window 1
On-Screen keyboard: how is it done? 4
Need good way to handle a wpf UC GotFocus and LostFocus events 1
WTSEnumerateSessions 2

Top