Home All Groups Group Topic Archive Search About
Author
23 Jul 2006 5:42 PM
rodchar
hey all,

i have an image that i want to put on my form and was just wondering if
there is a way to take away the white background on the image (make it
transparent)?

thanks,
rodchar

Author
23 Jul 2006 6:13 PM
Herfried K. Wagner [MVP]
"rodchar" <rodc***@discussions.microsoft.com> schrieb:
> i have an image that i want to put on my form and was just wondering if
> there is a way to take away the white background on the image (make it
> transparent)?


Call the 'Bitmap' object's 'MakeTransparent' method.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
23 Jul 2006 10:01 PM
rodchar
how do i get to that method? i'm using a pictureBox to contain my bitmap is
that right so far?

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "rodchar" <rodc***@discussions.microsoft.com> schrieb:
> > i have an image that i want to put on my form and was just wondering if
> > there is a way to take away the white background on the image (make it
> > transparent)?
>
>
> Call the 'Bitmap' object's 'MakeTransparent' method.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
Author
23 Jul 2006 11:15 PM
Matt
Can you be more specific about what you want to do?  If you want a picture
to completely fill the form, it's better to use the BackGround image of the
form.  If you just want it on part of the form, a picturebox is fine - there
are several other options such as panels also.

If you do place an image in a picturebox or other container control, you
will need to make both the image and the container transparent, or set the
backcolor of the container to the same backcolor as the form, otherwise
you'll end up with the image transparent and showing the color of the
picturebox it's on.

Show quoteHide quote
"rodchar" <rodc***@discussions.microsoft.com> wrote in message
news:2D3BCC8C-8E5F-4496-B1D8-CF9DE6E43A1F@microsoft.com...
> how do i get to that method? i'm using a pictureBox to contain my bitmap
> is
> that right so far?
>
> "Herfried K. Wagner [MVP]" wrote:
>
>> "rodchar" <rodc***@discussions.microsoft.com> schrieb:
>> > i have an image that i want to put on my form and was just wondering if
>> > there is a way to take away the white background on the image (make it
>> > transparent)?
>>
>>
>> Call the 'Bitmap' object's 'MakeTransparent' method.
>>
>> --
>>  M S   Herfried K. Wagner
>> M V P  <URL:http://dotnet.mvps.org/>
>>  V B   <URL:http://classicvb.org/petition/>
>>
Author
24 Jul 2006 12:14 AM
rodchar
> If you do place an image in a picturebox or other container control, you
> will need to make both the image and the container transparent, or set the
> backcolor of the container to the same backcolor as the form, otherwise
> you'll end up with the image transparent and showing the color of the
> picturebox it's on.

this is what i'm trying to do. however, how do i make the image's background
transparent?

Show quoteHide quote
"Matt" wrote:

> Can you be more specific about what you want to do?  If you want a picture
> to completely fill the form, it's better to use the BackGround image of the
> form.  If you just want it on part of the form, a picturebox is fine - there
> are several other options such as panels also.
>
> If you do place an image in a picturebox or other container control, you
> will need to make both the image and the container transparent, or set the
> backcolor of the container to the same backcolor as the form, otherwise
> you'll end up with the image transparent and showing the color of the
> picturebox it's on.
>
> "rodchar" <rodc***@discussions.microsoft.com> wrote in message
> news:2D3BCC8C-8E5F-4496-B1D8-CF9DE6E43A1F@microsoft.com...
> > how do i get to that method? i'm using a pictureBox to contain my bitmap
> > is
> > that right so far?
> >
> > "Herfried K. Wagner [MVP]" wrote:
> >
> >> "rodchar" <rodc***@discussions.microsoft.com> schrieb:
> >> > i have an image that i want to put on my form and was just wondering if
> >> > there is a way to take away the white background on the image (make it
> >> > transparent)?
> >>
> >>
> >> Call the 'Bitmap' object's 'MakeTransparent' method.
> >>
> >> --
> >>  M S   Herfried K. Wagner
> >> M V P  <URL:http://dotnet.mvps.org/>
> >>  V B   <URL:http://classicvb.org/petition/>
> >>
>
>
>