XP Style custom dropdown button

  • Thread starter Thread starter Steve Graham
  • Start date Start date
S

Steve Graham

Anyone created or has an idea how to create a custom
button that looks the same as the dropdown button on the
combo box in xp style.

Easy enough for non-xp style as standard flat style
allows the paint event to draw button as

ControlPaint.DrawScrollButton(e.Graphics,
button2.ClientRectangle,ScrollButton.Down,
ButtonState.Normal)

but as XP style requires flat style system, paint
nolonger has any effect.

Thanks
 
Set the "FlatStyle" to "System" and add a manifest file to your app
directory. On XP, it will work the way you want it. HOwever, in other
systems, you will have to draw it yourself.

-vJ
 
You can also enable XP visual styles by using:

Application.EnableVisualStyles( );

make sure you use this code before the initializecomponent( ) method.

Fabio Cavalcante
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top