O
osmarjunior
Hello there...
I have a custom user control, in which i put a panel on the top.
In the Paint event of the panel, i have the following code:
VisualStyleRenderer x = new
VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupHead.Normal);
x.DrawBackground(e.Graphics, e.ClipRectangle);
VisualStyleRenderer y = new
VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupExpand.Normal);
y.DrawBackground(e.Graphics, new
Rectangle(e.ClipRectangle.Width-30, e.ClipRectangle.Y, 30,
e.ClipRectangle.Height));
But when I run the application, and resize the form, or move another
program window above my application window, the user control drawing
becomes "noised"... a kind of "broken"...
I don't know what's happening...
Should I use another event instead of Paint??? But if I use another
event, how am I supposed to draw my component???
Regards.
Junior.
I have a custom user control, in which i put a panel on the top.
In the Paint event of the panel, i have the following code:
VisualStyleRenderer x = new
VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupHead.Normal);
x.DrawBackground(e.Graphics, e.ClipRectangle);
VisualStyleRenderer y = new
VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupExpand.Normal);
y.DrawBackground(e.Graphics, new
Rectangle(e.ClipRectangle.Width-30, e.ClipRectangle.Y, 30,
e.ClipRectangle.Height));
But when I run the application, and resize the form, or move another
program window above my application window, the user control drawing
becomes "noised"... a kind of "broken"...
I don't know what's happening...
Should I use another event instead of Paint??? But if I use another
event, how am I supposed to draw my component???
Regards.
Junior.