Aside from writing and testing codes for new programs, part of the programmers’ role is to identify and correct any coding errors from an existing application or rewrite the program if necessary. In this video that is part of the Welcome to Delphi series by Alister Christie, we will get the same scenario. Here, Alister will be placed in a pretend situation where a client asked him to update the graphical user interface (GUI) of an existing “Backup” Utility application and make it more responsive. See how he managed to take advantage of windows ui toolkit in Delphi (VCL) and complete the tasks in just a few minutes.

Updating unresponsive GUI using background thread

In this video, Alister will be working on an existing backup utility app. While the app is fully functioning, it still needs some modifications to make it more responsive and to make it run fast and smoothly. The backup utility app for this demo is designed to delete old files, backup game files, backup repositories, and data samples. The application, however, is not quickly responsive and freezes during runtime. To fix this issue, we need to run things using the background thread.

In programming, a background thread is a thread that runs behind the scenes, while the foreground thread continues to run. Alister will demonstrate this process and manage to fix the GUI in no time. He then cleans up the code by taking advantage of some of the latest language features (inline variables and type inferencing) and enhancements to the Delphi Runtime Library (System.IOUtils). To top it all off, he even made some tweaks so the app will run even faster by executing some of the code in parallel (using TTask in System. Threading).

To learn more, feel free to watch the quick demo below and see how you can fix GUI issues in just a few minutes.


Por que não download a free trial of the latest version of RAD Studio with Delphi and try out some of our examples today?


Reduza o tempo de desenvolvimento e chegue ao mercado mais rapidamente com RAD Studio, Delphi ou C ++ Builder.
Projeto. Código. Compilar. Implante.
Iniciar avaliação gratuitaAprimore hoje

Delphi Community Edition grátisEdição gratuita da comunidade C ++ Builder