小编Rog*_*itz的帖子

Delphi 11 Alexandria PaintBox 在 RDP 中闪烁

我刚刚从 Delphi 10.4.2 升级到 Delphi 11 Alexandria。我经常使用 RDP,因此当 TPaintBox 失效时我注意到闪烁。奇怪的是,如果带有 TPaintBox 的表单是第一个创建的表单,它不会闪烁。如果在本地计算机上运行,​​它也不会闪烁。仅在 RDP 中。如果我在 Delphi 10.4.2 中编译相同的项目,它在 RDP 中不会闪烁。

有人能解决这个问题吗?这“仅仅是”Delphi 11 中的一个错误吗?

编辑:演示项目http://procurisupdate.se/downloads/Temp/PaintBoxFlicker.zip

具有两种形式的简单项目。其中一个有一个 TImage,所以它相当大。如果按原样运行,当您单击图片并移动鼠标时,它会闪烁。如果您进行更改,以便首先创建 Form23(或者即使它是在 Application.run 之前创建的),它也不会闪烁。请注意,它仅在 RDP 中闪烁。

Edit2:经过一番查看后,我在 TApplication.Run 中发现以下内容:

procedure TApplication.Run;
begin
  FRunning := True;
  try
{$IF NOT DEFINED(CLR)}
    AddExitProc(DoneApplication);
{$ENDIF}
    RemoteSessionCheck; // This has been added since Delphi 10.4.2
    if FMainForm <> nil then
    ...
Run Code Online (Sandbox Code Playgroud)

如果我注释掉 RemoteSessionCheck; 并重新编译(您必须将您的 Source\vcl 目录添加到库路径),它不会闪烁。

delphi vcl delphi-11-alexandria

5
推荐指数
1
解决办法
806
查看次数

标签 统计

delphi ×1

delphi-11-alexandria ×1

vcl ×1