Hi,
I've got a problem with setting a button to status enabled:= false. The button on the form does not refresh properly after the ProcessMessages command. This is the example code, two buttons on the form, button1 disables button2:
procedure TForm1.Button1Click(Sender: TObject);
begin
Button2.Enabled := False;
Application.ProcessMessages;
sleep(2000); // for example 2 seconds
end;
The strange thing is that it will work with the sender button "Button1".
Thanks in advance!