Drawing images on XP Style buttons

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

I finally figured out how to enable XP style on VB .NET apps, but now
when I want a button to show an image it seems to disappear when the xp
style is enabled. Actually the image disappears whenever a button's
FlatStyle property is set to System which is what it has to be for XP
Style to work. So my question is, what's the best way of showing an
image on such a button. Preferably an image from an image list since I
need transparency.
 
* Max said:
I finally figured out how to enable XP style on VB .NET apps, but now
when I want a button to show an image it seems to disappear when the
xp style is enabled. Actually the image disappears whenever a button's
FlatStyle property is set to System which is what it has to be for XP
Style to work. So my question is, what's the best way of showing an
image on such a button. Preferably an image from an image list since I
need transparency.

<URL:http://www.codeproject.com/cs/miscctrl/xp-style_button.asp>
 
I finally figured out how to enable XP style on VB .NET apps, but now
when I want a button to show an image it seems to disappear when the xp
style is enabled. Actually the image disappears whenever a button's
FlatStyle property is set to System which is what it has to be for XP
Style to work. So my question is, what's the best way of showing an
image on such a button. Preferably an image from an image list since I
need transparency.

You may need to put code in the Paint event for the button and draw the
image yourself with GDI+ methods. It's not the hardest thing in the world. I
just learned how to do it myself when I was looking to put a
downward-pointing arrow on a button, like "More v" (with the v representing
the arrow).
 
Back
Top