This package allows you to lock and unlock the user interface in a simple way.
[Optional]
For ease I recommend using the Boss for installation- Boss - Dependency Manager for Delphi
boss install github.com/viniciussanchez/blockui-vcl
Add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path
../blockui-vcl/src
You need to use VCL.BlockUI.Intf and VCL.BlockUI
uses VCL.BlockUI.Intf, VCL.BlockUI;
var
BlockUI: IBlockUI;
begin
BlockUI := TBlockUI.Create;
>> Your code
end;
In the Create method you can tell which component you want to block:
BlockUI := TBlockUI.Create(Your component);
If not reported any component, the default is Application.MainForm