Delphi-Quellcode:
procedure TForm1.Button3Click(Sender: TObject);
begin
if (MessageDlg('Please wait for a while when erasing selected/all data of the files.'
+ #13+#10
+ 'Once they are deleted, they are never recovered.'
+ #13+#10
+ 'Are you sure to delete them?', mtWarning, [mbYes, mbNo], 0) = mrYes) then
begin
DeleteFile(ListView1.Selected.subitems[1]);
showmessage('File Deleted!');
ListView1.DeleteSelected;
end
else //not
begin
end.
end;
Ohne das 2. if sollte es gehen.
Florian