感受一下区别:

procedure TForm1.Timer2Timer(Sender: TObject);
var
  cvs: TCanvas;
  Rect: TRect;
  Str: string;
begin
  EXIT;
  cvs := TCanvas.Create;
  cvs.Handle := GetDC(0);
  SetBkMode(cvs.Handle, TRANSPARENT);
  //cvs.Font.Name := '宋体';
  cvs.Font.Style := [fsBold, fsItalic];
  cvs.Font.Size := 48;
  Randomize;
  cvs.Font.Color := Random($FFFFFF);
  Rect := Screen.DesktopRect;
  Str := '万一的 Delphi 博客';
  cvs.TextRect(Rect, 300, 300, Str);
  cvs.Free;
end;

改成OPAQUE以后,没感觉有什么区别,待续。。。

相关文章:

  • 2021-12-22
  • 2021-12-12
  • 2021-12-19
  • 2022-12-23
  • 2021-04-14
  • 2021-08-22
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2022-01-19
  • 2021-07-07
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案