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 8846139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:54:21+00:00 2026-06-14T11:54:21+00:00

I need to program a keyboard, with some configurations and customizations. I need to

  • 0

I need to program a keyboard, with some configurations and customizations.
I need to configure it to be enabled if any text area is focused before the keyboard.
mainly I need to know what control is selected.

The Keyboard is a standalone application, so it cannot deal directly with the controls, just by accessing the OS.

for more explanation, I am gonna tell you the scenario:

  1. the user runs the keyboard application, which its ‘topmost’ is set, and ShowInTaskBar is unset, and the keyboard is disabled.
  2. the user clicks on any text control in the window, like the notepad or a TextBox in Microsoft Word or Paint, then after clicking the keyboard application is enabled.

  3. the user clicks on the keyboard application and its keys to write text on the TextBox selected before in step 2, please note that the previous TextBox will loose focus but the keyboard will still enabled.

  • 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-06-14T11:54:23+00:00Added an answer on June 14, 2026 at 11:54 am

    It is easy by searching for the caret position, since it should be larger than 0

        GUITHREADINFO lpgui = new GUITHREADINFO();
        IntPtr fore = GetForegroundWindow();
        uint tpid = GetWindowThreadProcessId(fore, IntPtr.Zero);
        lpgui.cbSize = Marshal.SizeOf(lpgui.GetType());
        bool flag = GetGUIThreadInfo(tpid, out lpgui);
        WINDOWINFO pwi = new WINDOWINFO();
        pwi.cbSize = (uint)Marshal.SizeOf(pwi.GetType());
        GetWindowInfo((IntPtr)lpgui.hwndCaret, ref pwi);
    
        if (flag)
        {
            if (!(lpgui.rcCaret.Location.X == 0 && lpgui.rcCaret.Location.Y == 0))
            {
    
    
                //TODO
    
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C program that detects keyboard events, but I need to know
In my program I need to programmatically configure an ApplicationContext. Specifically, I have a
I currently need to provide multiple keyboard interrupts for a program. Is there an
I'm writing a program with visual C++ that should change some keyboard keys in
I need help to create keyboard shortcuts in my Java program. As can be
I need to have my program take in numbers from the keyboard, but need
I need a program that checks if the difference between all pairs of elements
I need my program to create and edit a config file, which would contain
I need my program to see different colors. Pretty much all I need is
I need a program that reads from multiple files and displays a report based

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.