Is there anyway to get any focus input (textBox) on any screen any app that active in the windows??
I want to create console application that read RFID tag and put the value (result) on any input box
that is focusing. please advise. Is it possible?
Is there anyway to get any focus input (textBox) on any screen any app that active in the windows??
I want to create console application that read RFID tag and put the value (result) on any input box
that is focusing. please advise. Is it possible?
You can use this method to Send Keys to the other applications textbox: C# using Sendkey function to send a key to another application
You can check to see if any form is active in your windows application. If form is active, then you can check which TextBox in the form has focus:
FormCollection fc = Application.OpenForms;
foreach (Form frm in fc)
{
if (frm != null)
{
foreach (TextBox txt in frm.Controls)
{
if (txt.Focused)
{
txt.Text = "your text";
}
}
}
}