Making it happen
Internet Explorer Toolbar Redraw Problems
The standard code for having a transparent IE toolbar:
protected override void OnPaintBackground(PaintEventArgs e) { IntPtr hdc = e.Graphics.GetHdc(); Rectangle rec = new Rectangle(e.ClipRectangle.Left, e.ClipRectangle.Top, e.ClipRectangle.Width, e.ClipRectangle.Height); DrawThemeParentBackground(this.Handle, hdc, ref rec); e.Graphics.ReleaseHdc(hdc);}
it’s found everywhere, however it’s just plain wrong. There are lots of redrawing issues when you are using controls with transparent background (that is, labels, buttons etc). Luckily you can easily fix them by having Rectangle rec = new Rectangle(0, 0, Bounds.Width, Bounds.Height);
| Print article | This entry was posted by andrei on March 4, 2009 at 3:00 pm, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
