BUG: You cannot use the Graphics.DrawXxxx methods to draw on a surface that is created by using the Graphics.FromImage method in the .NET Framework 1.0 or the .NET Framework 1.1 (834457)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
SYMPTOMSThe Graphics.DrawXxxx methods in the Microsoft .NET Framework do not draw when you do the following: - You create a Graphics object by using the Graphics.FromImage method on a loaded bitmap.
- Then you use the Graphics.DrawXxxx methods to draw on top of the bitmap.
The bitmap is also reloaded. WORKAROUNDTo work around this problem, use the Bitmap.MakeTransparent method. To do this, locate the following line of code in step 2 of the "Steps to reproduce the behavior section": Bitmap b = new Bitmap(BitmapPath); Under this line of code, add the following code: b.MakeTransparent(Color.FromArgb(0,0,0)); STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 12/14/2004 |
---|
Keywords: | kbWindowsForms kbGDI kbtshoot KB834457 kbAudDeveloper kbAudITPRO |
---|
|