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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:42:10+00:00 2026-06-14T12:42:10+00:00

I tried creating a custom CheckedListBox and overriding the OnKeyUp, OnKeyPress, OnKeyDown, OnPreviewKeyDown methods

  • 0

I tried creating a custom CheckedListBox and overriding the OnKeyUp, OnKeyPress, OnKeyDown, OnPreviewKeyDown methods but I couldn’t accomplish what I wanted to accomplish.

Essentially what is happening now is that if the user presses a key while the CheckedListBox has focus, the selected item changes. For example, if the user presses the up or down key, the next/previous item in the CheckedListBox is selected. if the user presses ‘A’, then the first item that begins with the letter ‘A’ is selected.

I want the CheckedListBox to behave in such a way that it is completely unresponsive to key presses (but still responsive to mouse clicks).

Can someone please tell me how to accomplish this?

  • 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-14T12:42:12+00:00Added an answer on June 14, 2026 at 12:42 pm

    I think it is possible to achieve this by inheriting from CheckedListBox and overriding it’s ProcessCmdKey() method to return true. That should ignore all commands.

    I’ll give it a try in a solution and report back 🙂

    Update:

    It works.
    Code I used:

    using System.Windows.Forms;
    
    public class CheckedListBoxIgnoreKeyboard : CheckedListBox
    {
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            return true;
        }
    }
    

    A rebuild is required for the control to show up in Toolbox.

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

Sidebar

Related Questions

I've tried creating my own version of a UIPickerView element for MonoTouch Dialog, but
I tried creating custom security and policy as given here: http://download.oracle.com/docs/cd/E15523_01/relnotes.1111/e10132/owsm.htm#CIADFGGC when I run
I have tried creating a syntax highlighter for a custom file definition. I get
Being horrible at the design end, I tried creating the above code and it
I recently tried using the Cloud9 online IDE . It starts by creating a
I am having trouble creating an entity using inout ports. I tried writing the
I have small library i want to use for creating games. First, i tried
tried uncommenting pam_limits.so from the pam.d directory but no luck. Basic PAM seems to
Tried searching the site, but cannot find an answer to my problem: Lets say
I've tried to create a custom widget plugin for QT Designer following this (

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.