Combobox button color

  • Thread starter Thread starter Dave Wurtz
  • Start date Start date
D

Dave Wurtz

Can anyone tell me how to get the current color of a combobox's button?
I have a custom control that I want to look similar to a combobox. It
contains a button control that I want to look like the button on a
combobox.

If possible, I would also like to get the arrow image that is used on
the combobox.

When different styles are used, the colors and image changes.

Thanks for the help in advance!

Dave Wurtz
 
Dave Wurtz said:
Can anyone tell me how to get the current color of a combobox's button?
I have a custom control that I want to look similar to a combobox. It
contains a button control that I want to look like the button on a
combobox.

If possible, I would also like to get the arrow image that is used on
the combobox.

'SystemColors.Control' will give you the color,
'ControlPaint.DrawComboButton' can be used to draw the button.
 
I don't quite understand how to use the ControlPaint.DrawComboButton
and there are very few examples. Do you have an example of how to use
this?

Thanks.
Dave
 
Dave Wurtz said:
I don't quite understand how to use the ControlPaint.DrawComboButton
and there are very few examples. Do you have an example of how to use
this?

\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As PaintEventArgs _
) Handles MyBase.Paint
ControlPaint.DrawComboButton( _
e.Graphics, New Rectangle(10, 10, 20, 20), ButtonState.Normal _
)
End Sub
///
 
Back
Top