the problem raise by OnPaint

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

when i write down the codes like below
when I move the mouse
The display of the form will glimmer
override protected void OnMouseMove(MouseEventArgs e)
{
//do something
this.Invalidate();
}
How can i deal with it?Tell me the resolution,thank you.
-- there is no failure only give up
 
andychan said:
when i write down the codes like below
when I move the mouse
The display of the form will glimmer

You may want to enable double buffering:

\\\
Public Sub New()
Me.SetStyle( _
ControlStyles.ResizeRedraw Or _
ControlStyles.DoubleBuffer Or _
ControlStyles.AllPaintingInWmPaint, _
True _
)
Me.UpdateStyles()
InitializeComponent()
End Sub
///
 
Back
Top