发信人: iew (走走), 信区: BorlandDev
标 题: Re: 请问怎么清除Canvas上原来画的东西
发信站: 哈工大紫丁香 (2001年12月14日11:52:26 星期五), 站内信件
void __fastcall TForm1::ClearButtonClick(TObject *Sender)
{
Invalidate();
}
//------------------------------------------------------------
void __fastcall TForm1::DrawButtonClick(TObject *Sender)
{
Form1->Canvas->Ellipse(0,0,40,40);
}
//------------------------------------------------------------
可以,我试过了,一个按钮用来化图,一个用来清除,你自己看看
Good Luck!
【 在 iew (走走) 的大作中提到: 】
: 有,是TWinControl的方法,执行Invalidate();后,会触发Form的 OnPaint
: 具体,看帮助
: TWinControl::Repaint
: TWinControl See also
: Repaints the windowed control抯 image on the screen.
: virtual void __fastcall Repaint(void);
: Description
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 天外飞仙]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.029毫秒