473,699 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1322
* 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.as p>

--
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******** ************@co mcast.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.as p>


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******** ************@co mcast.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
3499
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 add images to my menu buttons they don't show when the form is created. But, if I don't use the XP style the images show on my buttons correctly. Can someone please explain to me what the problem is and how to get around it? Here is how I'm calling...
1
1332
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 when I switch the application to the Windows XP look the images dissappear from the buttons and all I have is an XP style button with text on it. Is there a way to use XP style buttons and still have images displayed on them?
9
565
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 add images to my menu buttons they don't show when the form is created. But, if I don't use the XP style the images show on my buttons correctly. Can someone please explain to me what the problem is and how to get around it? Here is how I'm calling...
5
13363
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 http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9172
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7745
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.