....
function MessageBoxTimeOut(hWnd: HWND; lpText: PChar; lpCaption: PChar; uType: UINT;
wLanguageId: WORD; dwMilliseconds: DWORD): Integer; stdcall; external user32 name 'MessageBoxTimeoutA';
procedure TForm1.Button1Click(Sender: TObject);
begin
MessageBoxTimeout(Application.Handle,
'La aplicación se cerrará en unos segundos...','',
MB_SYSTEMMODAL or MB_TOPMOST or MB_ICONINFORMATION, 0, 4000); Application.Terminate;
end;