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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:00:24+00:00 2026-06-02T18:00:24+00:00

If you open any modal dialog inside a keydown event of a TreeView (or

  • 0

If you open any modal dialog inside a keydown event of a TreeView (or in the Form with KeyPreview=true if focus is on a TreeView) you will hear an annoying DING!

How do i prevent it from happening?

This ding usually is a signal that key event wasnt handled (like, by default TextBox will ding for Ctrl+A etc). However, setting e.Handled or e.SuppressKeyPress doesnt help in the case of modal dialog in TreeView. It helps when doing anything EXCEPT opening a modal dialog!

  • 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-02T18:00:27+00:00Added an answer on June 2, 2026 at 6:00 pm

    The native Windows treeview control gets very cranky when you pump a message loop in one of its events. The standard solution is to delay the processing of the event until all the events are complete. Easy to do with the Control.BeginInvoke() method. Worked in this case too:

        private void treeView1_KeyDown(object sender, KeyEventArgs e) {
            e.Handled = e.SuppressKeyPress = true;
            this.BeginInvoke(new Action(() => 
                (new Form1()).ShowDialog()
            ));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to detect that whether any modal dialog box is open over
Jquery UI Dialog modal-form doesn't shows up inside table, but works fine outside. This
Are there any open source libraries (any language, python/PHP preferred) that will tokenize/parse an
I need a modal dialog to open ontop of an tinyMCE editor and other
I am trying to open a modal jquery dialog using jquery 1.4 and jquery-ui-1.8rc3.custom.js
Im using JQuery dialog and open an iframe inside it in the following way
This script opens a jQuery dialog/modal to request verification prior to submitting the form,
I have a script that generates a modal dialog and inside of that, I
I need to open a modal dialog after the Firefox extension is launched, and
I got a jquery modal dialog which i load a jquery datatable inside. I

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.