A Picture can control its background erasure mechanism by overriding OnDrawBackground. When you do this on a TranslucentForm, you must ensure all pixels are cleared. If you use a System.Drawing.Bitmap for erasure, and it has transparency, it will not erase everything. Before you draw the Bitmap, clear the Graphics using Color.Transparent. The technique is illustrated in the sample below:
DrawBackgroundTest
OnDrawBackground in a TranslucentForm
Moderators: Frank Hileman, Anne Szyjan
- Frank Hileman
- Site Admin
- Posts: 1400
- Joined: Sun Jul 25, 2004 8:16 pm
- Location: California
- Contact:
OnDrawBackground in a TranslucentForm
Frank Hileman
http://www.vgdotnet.com
http://www.vgdotnet.com