473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

input focus

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
Nov 16 '05 #1
3 1622
VJ
If you have a Form... then, this.ActiveControl(), will give you the
ActiveControl in the form.

"Mészáros Tamás" <me*****@sch.bme.hu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 16 '05 #2
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

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

"Mészáros Tamás" <me*****@sch.bme.hu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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


Nov 16 '05 #3
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

"Mészáros Tamás" <me*****@sch.bme.hu> wrote in message
news:Oc****************@TK2MSFTNGP15.phx.gbl...
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

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

"Mészáros Tamás" <me*****@sch.bme.hu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: leiko | last post by:
I've written the following function who works great in IE function OnlyCharacter(tekst) { if (tekst.length == 1) { if (tekst >= "A" && tekst <="Z") {return true} } window.alert ("Only...
6
by: Csaba | last post by:
I'd like to have the cursor in the login form's username input text field when users load the login page. It works fine with the following implementation: <body...
7
by: JW | last post by:
hello everybody I've got the following problem. I'm writing a form and I'm using javascript to validate fields (i.e. numeric, not blank). When my scripts detects an error I want it to put the...
2
by: Peter Wright | last post by:
Hi all. Hopefully this should demonstrate the problem I'm having: http://flooble.net/~pete/focus-problem-demo/ (I'm testing it in Mozilla only, but I'm not sure if it's actually a...
5
by: Rune Runnestř | last post by:
How do I focus the cursor in the input field 'numberField' when accessing this jsp-file (or html-file) ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
3
by: Stefan Mueller | last post by:
I've an input box <input type = "text" name = "MyInput" value = ""> and a selection <select name = "MySelection" size = "1"> <option value = "1">Entry 1 <option value = "2">Entry 2 </select>...
5
by: linuxnooby | last post by:
This is a simple question but it is doing my head in all i want is a form text field to be focused when the page loads. Works in IE6 but not in Firefox 1.6 <body > <form...
2
by: yawnmoth | last post by:
Say I have two input elements and that I wanted to make it so that when the first ones input was what it should be, the focus would automatically be shifted to the next input element. ie....
1
by: firenet | last post by:
21 function js_reply_msg(node,g_id,u_id,par_id) 22 { 23 node.innerHTML="<FORM><TEXTAREA name=\"msg_con\"><\/TEXTAREA><br><INPUT type=\"submit\" value=\"reply\"><\/FORM>" 24 ...
1
by: Will_uk | last post by:
I am trying to return focus to a form input field. If i use <form>.<field>.focus() the focus returns to the field but if the field already contains a value it selects it (blacks it out). Is it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.