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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:20:29+00:00 2026-05-16T04:20:29+00:00

So in winforms, every dropdown combobox has this little arrow thingy to the right

  • 0

So in winforms, every dropdown combobox has this little arrow thingy to the right that tells the user it’s a dropdown, kinda like this:

http://www.ci.berkeley.ca.us/ig_common/images/igsch_dropdown_up_o2003silver.gif

Now how do I figure out how wide that is in pixels? Reason is, I’m using ControlDrawToBitmap, this doesn’t draw the text properly for the combo boxes, and I can redraw the contents, I just whack some of the arrows (which are drawn properly).

  • 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-16T04:20:30+00:00Added an answer on May 16, 2026 at 4:20 am

    First idea that comes to mind: Check to see if the combobox button width tracks with the scrollbar width. The scrollbar width can be modified in user preferences. Use GetSystemMetrics() API to get the width of the various scrollbar pieces. If you change your system scrollbar width and it does not affect the size of a normal combobox, then ignore this.

    Second idea: use the edit control’s formatting rect to find out what the edit control thinks is the usable display area (minus the combo box). See EM_GETRECT in MSDN.

    However, it sounds like this is just a hack workaround for your real problem: If you could get the controls to draw correctly to bitmap, then you wouldn’t need this hackery.

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

Sidebar

Related Questions

I am working on a rather large WinForms application that has dozens of controls
I have created a WinForms user control that is a set of five cascading
WinForms, .NET 3.5 I have a ComboBox that needs to display a growing list
I have a c# (.net 4.0) winforms application that runs pretty much every week
Suppose that for every Form in a WinForms application, you want to change the
I have this app written in VB.Net with winforms that shows some stats and
We have a winforms application calling a stored procedure every few seconds. The stored
Winforms-How can I make dialog boxes appear centered on MainForm? That is as opposed
My WinForms application has the standard Aero glass appearance on Vista/Windows 7. I want
Maybe I'm mis-remembering how Winforms works or I'm overcomplicating the hell out of 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.