Then i got a timer to shift the picture.
then ive addet a random function to shuffle through the picture.
now what i want to happen is that the same picture dont get shown twice.
So what i tried was to put the number of the picture in another tlistview and make a "While do" to check if randomly generated number is shown in the list.
this is the code ive tried using.
randomnr := random(listview1.Items.Count -1);
x := 0;
While x<listview2.Items.Count - 1 do
begin
if listview2.Items[x].Caption = inttostr(randomnr) then
begin
randomnr := random(listview1.Items.Count -1);
x := 0;
end;
x := x +1;
end;
item := listview1.Items[randomnr];
form2.image1.Picture.LoadFromFile(item.Caption);
listview2.Items.Add.Caption := inttostr(randomnr);
This is how the form looks likeimg.photobucket.com /albums/ v291/ Rambus666/ Programmering/ MultipleFilesDialog.jpg
All help is apreciatet :)
Best regards,
Darkyere
Edited by WingedPanther, 19 November 2008 - 01:17 PM.
add code tags (the # button)


Sign In
Create Account


Back to top









