I’m not 100% sure if this is what you are looking for but you should check out the VisualStyleRenderer in the System.Windows.Forms.VisualStyles-namespace.
- VisualStyleRenderer class (MSDN)
- How to: Render a Visual Style Element (MSDN)
- VisualStyleElement.ComboBox.DropDownButton.Disabled (MSDN)
Since VisualStyleRenderer won’t work if the user don’t have visual styles enabled (he/she might be running ‘classic mode’ or an operative system prior to Windows XP) you should always have a fallback to the ControlPaint class.
// Create the renderer.
if (VisualStyleInformation.IsSupportedByOS
&& VisualStyleInformation.IsEnabledByUser)
{
renderer = new VisualStyleRenderer(
VisualStyleElement.ComboBox.DropDownButton.Disabled);
}
and then do like this when drawing:
if(renderer != null)
{
// Use visual style renderer.
}
else
{
// Use ControlPaint renderer.
}
Hope it helps!