to 0桁骀,
你的办法果然行,
我试了可以实现:
procedure TForm1.Button2Click(Sender: TObject);
var
pic: TCanvas;
begin
pic := TCanvas.Create;
try
Button1.Caption:='';//加一句
pic.Handle := GetDC(Button1.Handle);
pic.Brush.Style := bsClear;
pic.Font.Color := clRed;
pic.TextOut(0,0, 'BBBBBB');
pic.Font.Color := clYellow;
pic.TextOut(10, 3, 'UUUUUU');
finally
ReleaseDC(Button2.Handle, pic.Handle);
pic.Free;
end;
end;