Transparent Images

  • Thread starter Christopher Kurtis Koeber
  • Start date
C

Christopher Kurtis Koeber

Dear All,
I know that I am asking a lot about images lately, but it is just that
new issues keep arising. My issue now has to do with transparent images.
When I display transparent images, sometimes either the previous image
displayed is now in the transparent area or sometimes even the buffer that
is on the screen. I tried to refresh the control but still no luck. Any
suggestions? Thank you in advance!
Sincerely,
Christopher Koeber
 
K

Ken Tucker [MVP]

Hi,

Dim ia As New Imaging.ImageAttributes

Dim cm As New Imaging.ColorMatrix

cm.Matrix33 = 0.5

ia.SetColorMatrix(cm)

Dim bm As New Bitmap("C:\camera.bmp")

e.Graphics.DrawImage(bm, New Rectangle(0, 0, 20, 20), 0, 0, 20, 20,
GraphicsUnit.Pixel, ia)



Ken

----------------------------

Dear All,
I know that I am asking a lot about images lately, but it is just that
new issues keep arising. My issue now has to do with transparent images.
When I display transparent images, sometimes either the previous image
displayed is now in the transparent area or sometimes even the buffer that
is on the screen. I tried to refresh the control but still no luck. Any
suggestions? Thank you in advance!
Sincerely,
Christopher Koeber
 
C

Christopher Kurtis Koeber

Thanks Ken, but what is the 'e' object? Do I have get a graphics handle from
the form and then draw my image using your code?
Christopher
 
K

Ken Tucker [MVP]

Hi,

I did the drawing in the paint event that is where the e came from.
You could just as easily use control.creategraphics to create the graphics
object to do the drawing.


Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top