BufferedGraphics & transparency

rossatron
06-23-2006, 08:28 AM
Can an image that has been buffered retain its transparency? I ask because so far i have tried and each time it is given a black background. Im loading these straigh onto my form using CreateGraphics. I have also tried in a picture box, rectangle etc and each time im seeing the black background. the code im using is as follows


Dim buffer As BufferedGraphics

Dim currentContext As BufferedGraphicsContext
currentContext = BufferedGraphicsManager.Current
buffer = currentContext.Allocate(Me.CreateGraphics,me.DisplayRectangle)
buffer.Graphics.DrawImage(Image.FromFile("image.png"), 0, 0, 100, 50)
buffer.Render()
buffer.Render(Me.CreateGraphics)
buffer.Dispose()


thanks in advance.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum