Hello!
How can I deny to user to destroy the form?
I did it:
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
if PasswordBox('Authentication','Type the password:')<>'asd' then
CloseAction:=caNone;
end;
But they can Destroy it with taskmanager. And it calls the OnDestroy but there is no closeaction..
Can you give us some more information about what this application is supposed to be accomplishing?
It is very hard to create processes that cannot be killed by Task Manager (or the appropriate API), and typically, Windows reserves that ability to key kernel level processes.
Understanding why you are trying to do this -- in detail -- will help you to get better suggestions and solutions (or alternative ways of addressing your actual problem).