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

  • Home
  • SEARCH
  • 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 9235003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:55:24+00:00 2026-06-18T06:55:24+00:00

My Application sometimes comminucate with a Server in another Thread, while the form should

  • 0

My Application sometimes comminucate with a Server in another Thread, while the form should be locked in this time(that means, the user cant fire any Click, KeyDown …. event). In this time, a waitoverlay with a loading circle is showing which blocks any mouse events like click or mousehover.

But the problem is, that the user can fire KeyDown events by pressing keys and the user can also make mouse clicks by pressing enter after navigating to the button with the TAB Key.

I know that Form.Enabled = true; can do the trick, but then the form is looking very ugly. I know also that I could make a bool inaction; and then look at this var in the event handler, but I think theres a better way.

Short Form: How can I block GUI Events like Click or KeyDown from a Form without .Enabled = True?

Any help will be greatly appreciated.

Edit: Solved it by adding this to the overlay control:

protected override bool ProcessKeyMessage(ref Message m)
{
    return true;
}
protected override bool ProcessTabKey(bool forward)
{
    return true;
}
  • 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-18T06:55:25+00:00Added an answer on June 18, 2026 at 6:55 am

    You may set the KeyPreview property of the form to false.

    When the KeyPreview is false, the form will not receive key events before the event is passed to the control that has focus. And if you change your focus to some unused control which does not interact with keys, form or any controls waiting for key events will not receive any events.

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

Sidebar

Related Questions

i have this client/server application, and the client application sometimes completely freezes when i
I have a user of my application that sometimes when they run the application
Sometimes my application crashes in QWidget::update() that is performing in non-GUI thread. I am
In this case, I've developed a CSS code for this web application ..and sometimes
Sometimes, tomcat restart will cause my application stop immediately so that my consuming data
I have an application that sometimes will utilize a large amount of data. The
I have Form1 in my application calling another form - Form2 using ShowDialog() method.
Some of the users of my application complain that sometimes (in a random way)
I have client server application that works with Firebird server. Everytime when clients connect
Sometimes my application generates URLs that look like http://localhost/?Area= or http://localhost/SomeController?Area= I don't currently

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.