C
c_xyTopa
hi all,
i have overwritten OnPaint() of a Form. During the MouseMove of the
Panel, wich is contained in that Form, i call Refresh() on the Form.
But it does not seem to call OnPaint() immediately, during the
MouseMove. How can i reach that behavior?
thank you
public class MsgBox : System.Windows.Forms.Form
{
mTitlePanel Panel = new Panel();
this.mTitlePanel.MouseMove += new MouseEventHandler(this.OnMouseMove);
protected void OnMouseMove(object sender, MouseEventArgs e)
{
this.Refresh();
}
protected override void OnPaint(PaintEventArgs e)
{
Pen blackPen = new Pen(Color.Black);
if (this.mMouseDown)
e.Graphics.DrawRectangle( blackPen, this.mRectangle );
else
base.OnPaint (e);
}
}
i have overwritten OnPaint() of a Form. During the MouseMove of the
Panel, wich is contained in that Form, i call Refresh() on the Form.
But it does not seem to call OnPaint() immediately, during the
MouseMove. How can i reach that behavior?
thank you
public class MsgBox : System.Windows.Forms.Form
{
mTitlePanel Panel = new Panel();
this.mTitlePanel.MouseMove += new MouseEventHandler(this.OnMouseMove);
protected void OnMouseMove(object sender, MouseEventArgs e)
{
this.Refresh();
}
protected override void OnPaint(PaintEventArgs e)
{
Pen blackPen = new Pen(Color.Black);
if (this.mMouseDown)
e.Graphics.DrawRectangle( blackPen, this.mRectangle );
else
base.OnPaint (e);
}
}