主题:为什么不能重画??
begin
if bbutton2.Caption ='画线' then
begin
form1.Canvas.Pen.Color :=CLBlue;
form1.Canvas.LineTo(form1.Width ,form1.Height );
bbutton2.Caption := '重画';
end
else
begin
form1.Repaint;
form1.Refresh;
bbutton2.Caption :='画线';
{为什么在此处用了一次以后下次便显示不出了?}
end;
end;
if bbutton2.Caption ='画线' then
begin
form1.Canvas.Pen.Color :=CLBlue;
form1.Canvas.LineTo(form1.Width ,form1.Height );
bbutton2.Caption := '重画';
end
else
begin
form1.Repaint;
form1.Refresh;
bbutton2.Caption :='画线';
{为什么在此处用了一次以后下次便显示不出了?}
end;
end;