Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5958421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:32:25+00:00 2026-05-22T18:32:25+00:00

Is it possible to utilize the sendInput function on windows that currently do not

  • 0

Is it possible to utilize the sendInput function on windows that currently do not have focus, and maybe through the use of multithreading, sendinput to multiple minimized windows at the same time, or send input to one window while you’re working on another window?

I’d like to do something like this in c#

thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:32:26+00:00Added an answer on May 22, 2026 at 6:32 pm

    You can only use SendInput to send input to the HWND with keyboard focus. Furthermore the window must be attached to the calling thread’s message queue, so one cannot simply SetFocus either.

    You’ll need to get the window’s thread id with GetProcessIdOfThread.

    When you have the thread id you can use the AttachThreadInput function to attach your thread to the other threads input processing.

    After all this you can probably use SetFocus and SendInput.

    You’ll probably want to detach your thread when you’ve sent your input.

    To get access to these method you’ll have to use P/Invoke for C# or C++/CLI. PInvoke.net is very handy as a reference. It will be a small chore importing all those functions, but when you are done you should be able to send input to whatever “window” you want.

    Also as a side note, I’m not sure if you are aware of this, but in pure Win32 everything is regarded as a window, even a button. If you are unlucky you may have to send the input to the handle of the text control belonging to the notepad application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible utilize javascript in the making of windows desktop applications.I use borland
Possible Duplicate: Single or multiple databases We are developing an application that will have
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
I have an application that sometimes will utilize a large amount of data. The
We have a fairly large Windows based 1.1 .NET application that we are considering
Possible Duplicate: PHP pagination class are there any PHP/Class libraries that i can utilize
I wish to utilize the new gated check-in function of TFS 2010. I have
I have an issue with a Windows Forms application that I am creating. The
Possible Duplicate: What does mysql_real_escape_string() do that addslashes() doesn't? I have been reviewing articles
Is it possible to have the same servlet perform validation? It seems that one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.