

' Make the default transparent color transparent for myBitmap. ' Create a Bitmap object from an image file.Į.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width, _ Private Sub MakeTransparent_Example1(ByVal e As PaintEventArgs) Private void MakeTransparent_Example1(PaintEventArgs e)īitmap myBitmap = new Bitmap("Grapes.gif") Į.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width,Į.Graphics.DrawImage(myBitmap, myBitmap.Width, 0, Draw the transparent bitmap to the screen.Į->Graphics->DrawImage( myBitmap, myBitmap->Width, 0, myBitmap->Width, myBitmap->Height ) Make the default transparent color transparent for myBitmap. Create a Bitmap object from an image file.īitmap^ myBitmap = gcnew Bitmap( "Grapes.gif" ) Į->Graphics->DrawImage( myBitmap, 0, 0, myBitmap->Width, myBitmap->Height )

Void MakeTransparent_Example1( PaintEventArgs^ e ) The code makes the system default transparent color transparent for myBitmap, and then draws the Bitmap to the screen. The following code example is designed for use with Windows Forms, and it requires PaintEventArgs e, which is a parameter of the Paint event handler.
