Jump to content
pyscripter

Remote desktop friendly

Recommended Posts

12 hours ago, David Heffernan said:

Hmm, how about setting ParentDoubleBuffered to True for all components and changing only form's DoubleBuffered property? I did so for now and see no issues. Probably I'm missing something?

I also did it the simplest way setting DoubleBuffered on startup only - I've no machines accessed both locally and remotely

Edited by Fr0sT.Brutal

Share this post


Link to post

@Fr0sT.BrutalSure, you could also optimize DoubleBuffering (if you do use DoubleBuffering).  But @Stephen Ball's fix addresses crashes that may occur during connection and disconnection, not the general slowness in painting.

Edited by pyscripter

Share this post


Link to post

@pyscripter

I mostly addressed David's answer on that SO topic where he calls TBaseForm.UpdateDoubleBuffered. AFAIU the issue with crashes only affects apps using styles or FMX which is not my case for now so I'm not dealing with all this registering and messaging

 

 

 

Share this post


Link to post
33 minutes ago, Fr0sT.Brutal said:

Hmm, how about setting ParentDoubleBuffered to True for all components and changing only form's DoubleBuffered property? I did so for now and see no issues. Probably I'm missing something?

I also did it the simplest way setting DoubleBuffered on startup only - I've no machines accessed both locally and remotely

The point is that many Delphi developers use double buffering to solve problems with flickering when resizing, rather than solving the root cause of the flickering. My experience of double buffering is that whilst it might deal with flickering, it also introduces its own problems. For instance, it changes the appearance of your program if you are using the Windows theme.  I don't want that.  So I don't use double buffering.  And I don't have flicker on resize.

Share this post


Link to post
9 hours ago, pyscripter said:

FWIW, my current codebase has this:

procedure TOrcForm.DestroyWindowHandle;
// DestroyWnd is not called from the form destructor, so we override DestroyWindowHandle instead
begin
  FreeAndNil(FDropTarget);
  WTSUnRegisterSessionNotification(WindowHandle);
  inherited;
end;

So I guess that's why I said "it rings some bells" in an earlier post.

Share this post


Link to post
20 hours ago, Stephen Ball said:

As @David Millington mentioned, we have been working with the R&D team to share tips learned to help speed up VCL applications under remote desktop - to read about it, including a code sample see:

https://blogs.embarcadero.com/how-to-speed-up-remote-desktop-applications/ 

And if we go to the documentation:

Vcl.Forms.TApplication Methods - RAD Studio API Documentation (embarcadero.com)

 

there is no link to: Vcl.Forms.TApplication.UpdateMetricSettings - RAD Studio API Documentation (embarcadero.com)

 

@Embarcadero, update documentation please !, or do we have to guess the methods? 😉

 

 

Share this post


Link to post

I was working with a project over RDP using 10.4.1. My usual session was to connect, do work, and disconnect (not logoff). When I reconnected in a subsequent session, the IDE would very slowly redraw itself onto the screen. It's much better with 10.4.2 from start and while working.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×