![]() |
9 picture problem
Liste der Anhänge anzeigen (Anzahl: 1)
Servus!
It's me again :mrgreen: I have 9 pictures like that : ![]() and i want that one of 9 picture wil show randomly like that: ![]() the image can be showed for 2000 msec and when disaper must add point and go to star of the loop =) Please help me =) |
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? |
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 |
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:
But it wont work :wall:
procedure TForm17.Timer1Timer(Sender: TObject);
type skica=timage; begin skica+random(9).show=true end; |
Re: 9 picture problem
Zitat:
|
Re: 9 picture problem
Zitat:
[DCC Error] Unit17.pas(46): E2010 Incompatible types: 'string' and 'Class reference' |
Re: 9 picture problem
Delphi-Quellcode:
procedure TForm17.Timer1Timer(Sender: TObject);
begin TImage(FindComponent('skica'+IntToStr(random(9)))).show=true end; |
Re: 9 picture problem
Zitat:
[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' |
Re: 9 picture problem
Delphi-Quellcode:
.. is it to late for you?
procedure TForm17.Timer1Timer(Sender: TObject);
begin TImage(FindComponent('skica'+IntToStr(random(9)))).show; end; Klaus |
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 10:45 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz