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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:44:49+00:00 2026-05-23T09:44:49+00:00

In a winform application running on windows 7 I want the change the background

  • 0

In a winform application running on windows 7 I want the change the background color of a combobox to highlight it.
The comboxbox has a DropDownStyle of DropDownList.

When I programmatically change the BackColor property to Red, only the background of the actual drop down list is changed to Red. When the drop down list is not opened, the combobox background displaying the selected value remains grey. What can I do so it becomes red too?

Setting the BackColor property works fine when app is run on Windows XP

  • 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-23T09:44:50+00:00Added an answer on May 23, 2026 at 9:44 am

    This should get you started.

    Change the combobox DrawMode property to OwnerDrawFixed, and handle the DrawItem event:

    private void comboBox1_DrawItem(object sender, DrawItemEventArgs e)
    {
        int index = e.Index >= 0 ? e.Index : 0;
        var brush = Brushes.Black;
        e.DrawBackground();
        e.Graphics.DrawString(comboBox1.Items[index].ToString(), e.Font, brush, e.Bounds, StringFormat.GenericDefault);
        e.DrawFocusRectangle();
    }
    

    The background color will be right but the style of the box will be flat, not the usual 3D style.

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

Sidebar

Related Questions

My company has an existing established WinForm application which in running on WinXP. The
Hi, We have a WinForm application running och Windows. This application offers extended logging
In my application I am running the same winform in different contexts to control
I'm developing an winform application for Windows Mobile 5.0 and above. I'm using .Net
Let's create WinForms Application (I have Visual Studio 2008 running on Windows Vista, but
I'm interessted in writing an application that is running on windows mobile. I've allready
I have a .NET application (C#, WinForms) application running on Windows XP. If i
I am running code coverage using VS 2010. This is a winform application. In
My winform application is launched by another application (the parent), I need determine the
I have a Winform application built with C# and .Net 2.0. I have a

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.