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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:09:40+00:00 2026-05-18T11:09:40+00:00

There is a post to set system-wide global hotkey in C# here I want

  • 0

There is a post to set system-wide global hotkey in C#
here

I want to set application-wide hotkey such that if user presses a hotkey on any child window of an application, a particular window will receive and process it.

Thanks.

  • 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-18T11:09:41+00:00Added an answer on May 18, 2026 at 11:09 am

    You can create a base form for your application and set keypreview property to true and handle keydown event so all your forms will have the same key definition.

    You also can use the following routine to register a hotkey for your forms but in this method, you will require to call same method on load event of each form.

    protected override bool ProcessCmdKey(ref Message message, Keys keys)
    {
        switch (keys)
        {
            case Keys.F2 | Keys.Control:
                //Process action here.
                return false;
        }
    
        return false;
    }
    

    You also can use the following unmanaged methods from user32.dll but of course i would not suggest that.

    static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint virtualKey);
    private static extern bool UnregisterHotKey(IntPtr hWnd, int id);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a post here that talks about this as being a bad idea
I know there is this post , but I still want to know more
I'm trying to measure the popularity of a post but there's no current system
By @user.posts , I can see there is a post with :unfinished status. But
I've build a simple SpringMVC login system that works fine, but I want to
I have a function that updates a user in the asp.net membership provider. <AcceptVerbs(HttpVerbs.Post)>
According to the blog post here Data Annotations in the Entity Framework there should
I need to build a nested comments system in a Rails 3 application that
Iam trying to use System.Web.UI.WebControls.Calender. But when I select any date , It post
I implimented the FB post to my app so the users can post there

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.