Groups | Blog | Home
all groups > dotnet drawing api > april 2004 >

dotnet drawing api : How to make one color transparent in picture through Vb.Net for a vba application


Vivek Gupta via .NET 247
4/30/2004 4:01:26 AM
(Type your message here)
How to make one color transparent in Image through Vb.Net for a vba application .The Image is on the word Document and i have to make one color transparent through .net coding.

Any idea Pls Help!!!!
--------------------------------
From: Vivek Gupta

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Bob Powell [MVP]
4/30/2004 3:02:09 PM
As long as you know exactly what the colour is you can use the
Bitmap.MakeTransparent method.

For example,

dim bm as Bitmap=Bitmap.FromFile(xxx.bmp)
bm.MakeTransparent(Color.Magenta)

Be aware though that you cannot save this image with a transparent colour.

I don't have any experience with vba so this might not be a vast amount of
help.

--
Bob Powell [MVP]
Visual C#, System.Drawing

All you ever wanted to know about ListView custom drawing is in Well Formed.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*

The GDI+ FAQ: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*





[quoted text, click to view]
application .The Image is on the word Document and i have to make one color
transparent through .net coding.
[quoted text, click to view]

AddThis Social Bookmark Button