473,797 Members | 3,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transparent Color in an Icon

How can I find the transparent color in an Icon and convert it into a Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on icons
that have other than the transparent color in the 0,0 pixel position.

--
Dennis in Houston
Nov 21 '05 #1
8 5634
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor
Nov 21 '05 #2
Thanks but he doesn't cover this topic.
--
Dennis in Houston
"Cor Ligthert" wrote:
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor

Nov 21 '05 #3
Dennis,

I see now that your question is not often answered in this newsgroup.

However maybe you can search this newsgroup and first look at this thread,

http://groups-beta.google.com/group/...26cb411e73a2c8
:-)

Cor
Nov 21 '05 #4
:-) lovely site! it isn't?

Cor Ligthert wrote:
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor

Nov 21 '05 #5
"Dennis" <De****@discuss ions.microsoft. com> schrieb:
How can I find the transparent color in an Icon and convert it into a
Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I
know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on
icons
that have other than the transparent color in the 0,0 pixel position.


Did you already try 'ToBitmap'? This method will preserve transparency:

\\\
Dim i As Icon = ...
Dim b As Bitmap = i.ToBitmap()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
Haven't tried that yet but will do so. When it's converted to the bitmap, is
there any way to find the transparency color from the bitmap?
--
Dennis in Houston
"Herfried K. Wagner [MVP]" wrote:
"Dennis" <De****@discuss ions.microsoft. com> schrieb:
How can I find the transparent color in an Icon and convert it into a
Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I
know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on
icons
that have other than the transparent color in the 0,0 pixel position.


Did you already try 'ToBitmap'? This method will preserve transparency:

\\\
Dim i As Icon = ...
Dim b As Bitmap = i.ToBitmap()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
Well, bitmaps really can't have transparent colors... I would
personally use PNGs. And even then, Microsoft is notorious for making
it almost impossible to use ARGB in .Net.

Nov 21 '05 #8
So how does bitmap.MakeTran sparent(color.r ed) work. Doesn't the bit map
display routines mask all pixel colors with Red backgroud mask that is Xor'd
or something like that to cancel out displaying all red colors in the bitmap.
I'm looking to find what that color is...there must be someway since the
bitmap certainly can have transparent areas.
--
Dennis in Houston
"ba*******@gmai l.com" wrote:
Well, bitmaps really can't have transparent colors... I would
personally use PNGs. And even then, Microsoft is notorious for making
it almost impossible to use ARGB in .Net.

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
496
by: Martin Reikenkamp | last post by:
I'd like to use a transparent icon in a ms access form. The icon looks good (transparency) when I use the Windows XP-style. But when I switch the preferences of the Windows & Buttons-settings to Windows - classic I see a light gray background behind the icon. What do I have to do when I would like to use the icon in both environments?
0
2790
by: Ziver | last post by:
Hello, I used the utility "Easy Icon Maker" and created a transparent icon for my Outlook button. When i view it from the windows explorer i see as transparent but if i execute my add-in that puts my button on the bar i see my icon having a blue background on my button.
2
19489
by: Peter Steele | last post by:
Visual Studio provides an icon editor but I can't figure out how to create a transparent icon. My app always shows the full 32x32 square, with a wide background instead of a transparent one. How do I get it to look transparent?
0
1345
by: Josch | last post by:
I have here a specific problem with ASP.NET in C#. I want to convert an Icon (System.Drawing.Icon icon) to a GIF-Image. First, my attempt was converting the icon to a Bitmap: Bitmap bmp = icon.ToBitmap(); Then save this Bitmap as a GIF-Image: bmp.Save("mypic.gif",ImageFormat.Gif);
0
1634
by: FredC | last post by:
I'm using VS C#.Net 2003. I built a simple windows form app. with the following attributes: - has a BackgroundImage set to a jpeg I built a very simple user control that contains a picture box set to an icon. The control does nothing except show the icon. In the main windows form, on formload event, I declare and instantiate 30 user controls and give them various locations on the main form. The Problem(s):
1
3093
by: FredC | last post by:
I'm using VS 2003, C#.Net 2003. I built a simple windows form app. with the following attributes: - has a BackgroundImage set to a jpeg I built a very simple user control that contains a picture box set to an icon. The UserControl constructor sets SetStyle( ControlStyles.SupportTransparentBackColor, true); this.BackColor = Color.Transparent; The control does nothing except display the icon.
2
3756
by: Lee | last post by:
Hi, I have a notify icon and have been trying to make the background color transparent. But do .ico files allow a transparent color? when i select the image for the notify icon it askes for type .ico. now i know i can set a transparent background with png's ect, but can i use tranparent (colors) with an ico? thanks
1
2071
by: =?Utf-8?B?a2VpdGguaHV0Y2hpc29u?= | last post by:
G'day Any tips on how to make a transparent icon for a vb.net application. I'm using Visual Studio 2005. Thanks
3
4218
vdraceil
by: vdraceil | last post by:
Does anyone know hw to set the background icon text color(in win XP) to transparent?? I accidently changed it to some color and now it is possible to change to any other color,but not transparent..so how do i set it back to transparent? there is no restore default option too..
0
9536
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
10468
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...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5458
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.