By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,685 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

Drawing images on XP Style buttons

P: n/a
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.
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
* Max <ma*****@yahoo.com> scripsit:
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>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
http://dotnetrix.co.uk/buttons.html

--
Mick Doherty
http://dotnetrix.co.uk
"Max" <ma*****@yahoo.com> wrote in message
news:f7********************@comcast.com...
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.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #3

P: n/a
Max
Herfried K. Wagner [MVP] wrote:
* Max <ma*****@yahoo.com> scripsit:
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>


Thanks for the link, but I don't think that method will work since I
need my form to work both with xp style and without (like in Win 2k).
The ideal case would be just to draw a picture on it, but I'm not sure
how to do that.
Nov 20 '05 #4

P: n/a

"Max" <ma*****@yahoo.com> wrote in message
news:f7********************@comcast.com...
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).
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.