A ver si el error puede venir por este código en el close del botón, es lo único que se me ocurre:
Código Delphi
[-]procedure TF_Inici.ToolButton8Click(Sender: TObject);
var FileInfo: TShFileOpStruct;
begin
if MDIChildCOUNT > 0 then
begin
ShowMessage('Hi han finestres obertes, tanca-les totes abans de sortir');
Abort;
end
else
begin
FileInfo.Wnd := Handle;
FileInfo.wFunc := FO_DELETE;
FileInfo.pFrom := 'C:\Gestio_Arbitral_1.0\Temp\*.jpg';
FileInfo.pTo := nil;
FileInfo.fFlags := FOF_NOCONFIRMATION;
ShFileOperation(FileInfo);
FileInfo.Wnd := Handle;
FileInfo.wFunc := FO_DELETE;
FileInfo.pFrom := 'C:\Gestio_Arbitral_1.0\Temp\*.pdf';
FileInfo.pTo := nil;
FileInfo.fFlags := FOF_NOCONFIRMATION;
ShFileOperation(FileInfo);
Close;
end;
end;
Saludos
Josep