Autor Beitrag
chickenfigt1989
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.04.11 22:13 
Hallo
Hab ein Timage auf meiner Form nun will ich dass wenn ich einen Button drücke das
Timage nach rechts wandert. Das Bild ist ein elefant und es sollte realistisch aussehen als wie wen es nach rechts wandern würde
wie macht man das?
lg
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mo 04.04.11 22:16 
Die Eigenschaft Left von TImage hast du aber entdeckt oder? :roll:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.04.11 22:18 
Ja hab ich entdeckt und hab auch danach ein sleep eingebaut
so siehts aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
image1.Left:=  40;
sleep(100);
sleep(100);
sleep(100);
image1.Left:=  45;
sleep(100);
sleep(100);
image1.Left:=  50;
sleep(100);
image1.Left:=  55;
sleep(100);
image1.Left:=  60;
sleep(100);
image1.Left:=  65;
sleep(100);
image1.Left:=  70;
sleep(100);
image1.Left:=  75;
sleep(100);
image1.Left:=  80;
sleep(100);
image1.Left:=  85;
sleep(100);
image1.Left:=  90;
sleep(100);
image1.Left:=  95;
sleep(100);

Allerdings hüpft es nach einen kurzen sleep gleich nach rechts ich will es aber schrittweise
lg
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mo 04.04.11 22:20 
Dann nimm doch einen Timer und in dem berechnest du jedes mal die Position der Figur in Abhängigkeit von der Zeit.
Oder mach es in einer Schleife wenn du das eher kannst, aber so wie oben ist das ja schrecklich.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Mo 04.04.11 23:01 
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Allerdings hüpft es nach einen kurzen sleep gleich nach rechts ich will es aber schrittweise
lg
na wenn Du sowas, in einer procedure stehen hast, was glaubst du was das Ergebnis ist! Bestimmt keine Bewegung!
Ne Schleife reicht da ja wohl auch aus, dann evtl noch application.processmessage oder ein image.refesh.
Aber hat ja @Dude566 schon alles gesagt :wink:

ALf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.04.11 23:17 
Oke vielen dank habs nun mit einer Schleife gelöst.

Lg