here i go whit a new problem and yet the same... i think.
on one of the forums i posted my last question in (im lost) the answer was that i could set i to be 0 from start in form load procedure. i did and it worked for a time. now it comes whit this error
Exception class EAccesViolation with message 'Acces violation at adress 004bb914 in module 'security screensaver.exe' read of adress 00000020'.
if i = Listview1.Items.Count -1 then
begin
if checkbox1.Checked = true then
begin
i := 0;
item := listview1.Items;
form2.image1.Picture.LoadFromFile(item.Caption);
end
else
begin
timersec.Enabled := false;
end;
end
else
begin
if checkbox2.Checked = true then {if randomize is true}
begin
end
else
begin
i := i + 1;
item := listview1.Items;
form2.image1.Picture.LoadFromFile(item.Caption); {this is where the error occurs}
form2.label8.Caption := 'Size of image: ' + inttostr(getfilesize(item.Caption) div 1024) + ' KB';
form2.Label7.Caption := item.Caption;
end;
end;
i hope someone now the answer cause im simply lost.
first it work, then not and i need to set i to be 0 from the start, then it works... and now suddenly a new error pops up..
i really cant understand the problem.
best regards,
Darkyere