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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:57:37+00:00 2026-06-09T18:57:37+00:00

my code is: protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) { if (keyData

  • 0

my code is:

protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
    if (keyData == (Keys.LWin | Keys.M))
    {
        MessageBox.Show("LWin M");
        return true;
    }
    return base.ProcessCmdKey(ref msg, keyData);
}

private void Form1_Load(object sender, EventArgs e)
{
    this.FormBorderStyle = FormBorderStyle.None;
}

but the MessageBox.Show("LWin M"); never work,who can help me?thanks

update

the

MessageBos.Show("LWin M"); 

just for test ,the real code is:

this.WindowState = FormWindowState.Minimized;
  • 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-09T18:57:39+00:00Added an answer on June 9, 2026 at 6:57 pm

    This doesn’t have anything to do with the FormBorderStyle, your code doesn’t work when you omit the Load event as well. The Win + M shortcut keystroke is used by Windows before it sends it to a program. You can easily tell what it does, it minimizes the active window.

    Never use the Windows key for your own shortcuts, you’ll need to stick with Ctrl, Alt and Shift. Even using unassigned shortcuts is a Bad Idea, that will break in the next Windows version.

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

Sidebar

Related Questions

I have a code: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch
I have code that overrides the TextBox ProcessCmdKey method: protected override bool ProcessCmdKey(ref Message
I have the following code: int a = 0; protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
If it does, why can't I override it in my code? protected override bool
i found this code: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource hwndSource =
I have onPause in activity and works great. This is code @Override protected void
In this code (from the WCF REST starterkit - preview2): protected override SampleItem OnAddItem(SampleItem
Here is my code: new Loading.LoadTast(ctx) { @Override protected String doInBackground(Integer... params) { Looper.prepare();
I have this code running in my onDestroy function: @Override protected void onDestroy() {
I have problem installing simple Windows Service, my code looks like this: using System;

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.