473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Drawing images on XP Style buttons

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
4 1309
* 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
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
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
1
by: Martin Keeton | last post by:
I.m developing applications using VB.NET and have a number of command buttons that have images on them. When The application is run with the classic windows style look the images appear just fine but...
9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.