Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi 9 picture problem (https://www.delphipraxis.net/131677-9-picture-problem.html)

dangerduck 28. Mär 2009 19:05


9 picture problem
 
Liste der Anhänge anzeigen (Anzahl: 1)
Servus!
It's me again :mrgreen:

I have 9 pictures like that :

http://www.shrani.si/f/V/uu/VEOwEh/slika1.png

and i want that one of 9 picture wil show randomly

like that:

http://www.shrani.si/f/34/l0/3HpdGM9d/slika-2.png

the image can be showed for 2000 msec and when disaper must add point and go to star of the loop =)


Please help me =)

Noedel 28. Mär 2009 19:18

Re: 9 picture problem
 
and what´s the problem?

1)get a random digit from 1 to 9
2)show the belonging image
3)Take a timer with an interval of 2sec
4)After 2 sec the timer will hide the image
5)the user has to click on the space, where the image was

Did i understand that correctly?

dangerduck 28. Mär 2009 19:24

Re: 9 picture problem
 
i know how to create random digit
but i must show picture and i dont know how to combine that 2 things :? other things i know but i will better use wait() then ttimer

dangerduck 28. Mär 2009 19:29

Re: 9 picture problem
 
sory for double post but i try like that
i gave image picture like that
Skica1
Skica2 ......
then i write code like that

Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
type
skica=timage;
begin
skica+random(9).show=true
end;
But it wont work :wall:

Klaus01 28. Mär 2009 20:01

Re: 9 picture problem
 
Zitat:

Zitat von dangerduck
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
type
  skica=timage;
begin
  TImage(FindComponent(skica+IntToStr(random(9)))).show=true
end;


dangerduck 28. Mär 2009 20:06

Re: 9 picture problem
 
Zitat:

Zitat von Klaus01
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
type
  skica=timage;
begin
  TImage(FindComponent(skica+IntToStr(random(9)))).show=true
end;

thx 10000x there is no error's more just
[DCC Error] Unit17.pas(46): E2010 Incompatible types: 'string' and 'Class reference'

Flips 28. Mär 2009 20:32

Re: 9 picture problem
 
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
begin
  TImage(FindComponent('skica'+IntToStr(random(9)))).show=true
end;

dangerduck 28. Mär 2009 20:36

Re: 9 picture problem
 
Zitat:

Zitat von Flips
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
begin
  TImage(FindComponent('skica'+IntToStr(random(9)))).show=true
end;

[DCC Error] Unit17.pas(44): E2064 Left side cannot be assigned to
[DCC Error] Unit17.pas(45): E2014 Statement expected, but expression of type 'Boolean' found
[DCC Fatal Error] Project16.dpr(5): F2063 Could not compile used unit 'Unit17.pas'

Klaus01 28. Mär 2009 20:39

Re: 9 picture problem
 
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
begin
  TImage(FindComponent('skica'+IntToStr(random(9)))).show;
end;
.. is it to late for you?

Klaus

dangerduck 28. Mär 2009 20:45

Re: 9 picture problem
 
same withotu :
is
[DCC Error] Unit17.pas(44): E2029 ':=' expected but '=' found
with:
is
[DCC Error] Unit17.pas(44): E2064 Left side cannot be assigned to
[DCC Error] Unit17.pas(45): E2014 Statement expected, but expression of type 'Boolean' found


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:37 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz