all groups > dotnet windows forms designtime > january 2005 >
You're in the

dotnet windows forms designtime

group:

Visual studio 2005 and overpinting


Visual studio 2005 and overpinting Dominik
1/30/2005 5:58:45 PM
dotnet windows forms designtime:
I'm devolping conntrol and I have noticed little bug in my control. In
design time after IDE displays menus, tips itp over my control it has some
lines, points and other pollution left-over after those elements - and I
must click on control to invalidate it. Is there any way to auto invalidate
Re: Visual studio 2005 and overpinting Dominik
1/31/2005 11:25:03 AM
Dnia Mon, 31 Jan 2005 14:30:19 +0800, joeycalisay napisa³(a):

[quoted text, click to view]

Yes I provide custom pinting:
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer , true);

[quoted text, click to view]

At this time my control painting is very simple I only fill it with brush
and paint one line.

e.Graphics.FillRectangle(Brushes.White, e.ClipRectangle);
e.Graphics.DrawLine(Pens.Black, 0, e.ClipRectangle.Bottom - 1,
e.ClipRectangle.Right, e.ClipRectangle.Bottom - 1);

btw. This bug is also when I draw something in OnPaintAdornments function
of the designer

OnPaintAdornments(System.Windows.Forms.PaintEventArgs pe)
{
base.OnPaintAdornments(pe);
using (Pen pen = new Pen(Color.Black))
{
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

pe.Graphics.DrawRectangle(pen,RenderBase.StandardRectangleCut(pe.ClipRectangle));
}
Re: Visual studio 2005 and overpinting joeycalisay
1/31/2005 2:30:19 PM
there must be some bugs on the way you paint your control. do you provide
custom painting? it will be helpful if you can provide snippets from your
control code...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Re: Visual studio 2005 and overpinting joeycalisay
2/1/2005 5:43:27 PM
I tried it in my VS2003 and OnPaintAdornments refreshes properly, I can't
verify on Beta 2.0 coz I don't have it installed, perhaps others can help
you...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]
pe.Graphics.DrawRectangle(pen,RenderBase.StandardRectangleCut(pe.ClipRectang
le));
[quoted text, click to view]

Re: Visual studio 2005 and overpinting Dominik
2/2/2005 1:27:45 PM
Dnia Tue, 1 Feb 2005 17:43:27 +0800, joeycalisay napisa³(a):

[quoted text, click to view]

Thanks for inerest. I finally find bug, it was in my painting code ofcourse

e.Graphics.FillRectangle(Brushes.White, e.ClipRectangle);
[quoted text, click to view]

When I have used control properties instead of ClipRectangle everything was
fine :)
It seems that ClipRectangle is diffrent when menu is covering only one part
AddThis Social Bookmark Button