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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:14:41+00:00 2026-05-24T17:14:41+00:00

How to hide DropDownList in ComboBox? I want use ComboBox only for displaying text.

  • 0

How to hide DropDownList in ComboBox?

I want use ComboBox only for displaying text.
This control look nice, for me is better than TextBox plus Button.
So control must be enabled, but without any items.
When user click arrow (or alt + down key) DropDownList should’n show, because ill select value from custom DataGridView in order to fill back text in ComboBox.

Edit. Alternative solution is set DropDownHeight to 1, with show only 1 pixel line after clicking control.

Edit. Real solution. Answer below

  • 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-24T17:14:42+00:00Added an answer on May 24, 2026 at 5:14 pm

    You can intercept the messages that cause the box to drop-down, in a subclass. The following snippet defines a control NoDropDownBox, that ignores the mouse clicks that result in a drop-down of the combo box:

    public class NoDropDownBox : ComboBox
    {
        public override bool PreProcessMessage(ref Message msg)
        {
            int WM_SYSKEYDOWN = 0x104;
    
            bool handled = false;
    
            if (msg.Msg == WM_SYSKEYDOWN)
            {
                Keys keyCode = (Keys)msg.WParam & Keys.KeyCode;
    
                switch (keyCode)
                {
                    case Keys.Down:
                        handled = true;
                        break;
                }
            }
    
            if(false==handled)
                handled = base.PreProcessMessage(ref msg);
    
            return handled;
        }
    
        protected override void WndProc(ref Message m)
        {            
            switch(m.Msg)
            {
                case 0x201:
                case 0x203:
                    break;
    
                default:
                    base.WndProc(ref m);
                    break;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to pass not only the dropdownlist ID using this, but I'm
I am trying to hide and unhide the textbox using dropdownlist , so for
I need to hide the arrow button of a ComboBox. I want DropDownStyle property
This is a follow up to this question: dropdownlist to combobox I have a
i want to hide and show my text box according to drop down select
I have this code that Show/Hide a text box if I select a category
I want to hide an option in my form unless a specific option is
I want to hide the download folder location so that when the user downloads
i'm trying to hide/show some control on a page from Page_LoadComplete. If a put
Possible Duplicate: Hide/Show Navigation & Tool Bar on tap This is the void I'm

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.