L
linuxadmin
hello!
i want to be able to repaint a class, derived from a form, by myself.
it works automatically, when i do:
protected override void OnPaint(PaintEventArgs e){
base.OnPaint(e);
Graphics g=e.Graphics;
// draw something
}
but how i can call OnPaint by myself?
i tried "OnPaint(new PaintEventArgs(...))", but the PaintEventArgs
ctor needs a 'Graphics' instance as argument, but i have none.
where it can be taken from?
another question:
i have enabled doublebuffering using:
protected override void OnShown(EventArgs e){
this.DoubleBuffered=true;
}
is that ok?
thanks in advice!
i want to be able to repaint a class, derived from a form, by myself.
it works automatically, when i do:
protected override void OnPaint(PaintEventArgs e){
base.OnPaint(e);
Graphics g=e.Graphics;
// draw something
}
but how i can call OnPaint by myself?
i tried "OnPaint(new PaintEventArgs(...))", but the PaintEventArgs
ctor needs a 'Graphics' instance as argument, but i have none.
where it can be taken from?
another question:
i have enabled doublebuffering using:
protected override void OnShown(EventArgs e){
this.DoubleBuffered=true;
}
is that ok?
thanks in advice!