Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

does anybody know how I can make a pictureBox

in a form, which has a picture with a transparent

background?

 

I know from programs for picture-processing that it

is possible to define a backgroundcolor, which should

define the transparent parts of the picture, but how

can I do this in .NET ?

 

Toni.

Greetings,

 

Toni.

Posted

Bitmap objects have a MakeTransparent method that you pass a color. It results in every pixel that is that color being transparent...

 

Dim bmp as new Bitmap("C:\testImage.bmp")
bmp.MakeTransparent(Color.Cyan) 
PictureBox1.Image = bmp

"It may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve."

 

- Edgar Allan Poe, 1841

 

I long to accomplish great and noble tasks, but it is my chief duty to accomplish humble tasks as though they were great and noble. The world is moved along, not only by the mighty shoves of its heroes, but also by the aggregate of the tiny pushes of each honest worker.

 

- Helen Keller

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...