Autor Beitrag
Monitor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

XP Server
D6 Pers
BeitragVerfasst: So 18.04.04 09:18 
Wenn ich bei einem Bild die Position pro Sekunde verändere flackert das Bild immer.
Wie kann ich das vermeiden?


Wie kann ich ein Bild im Quelltext verändern?
Bsp.: habe ein Image1 mit einen Mensch. Möchte aber wenn man auf einem Button klickt, dass ein anderes Bild erscheint(Bsp.Hose). Wie geht das?
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 18.04.04 09:22 
1. kA, gabs aber hier im Forum glaub schonmal.

2. Image1.Picture.LoadFromFile('Pfad zu Bild.jpg');
Monitor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

XP Server
D6 Pers
BeitragVerfasst: So 18.04.04 09:36 
Danke! :D
Monitor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

XP Server
D6 Pers
BeitragVerfasst: Mo 19.04.04 14:00 
Ich habe das flackern beseitigt und somit das Problem gelöst.
Für die, die es auch wissen wollen:
ausblenden Delphi-Quelltext
1:
 DoublePuffered:=true;					
wunsiedler
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 506
Erhaltene Danke: 4

Win7

BeitragVerfasst: Mo 03.05.04 18:27 
Mhhh...

könntest du das mit dem flackern genauer erklären?
wunsiedler
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 506
Erhaltene Danke: 4

Win7

BeitragVerfasst: Di 18.05.04 21:40 
Danke für die Antwort. :cry:
Shadowdragon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: Sa 22.05.04 18:26 
Das Bild flackert, da die "Zeichenrate" bzw. in diesem Fall die Pufferrate zu niedrig ist und man daher das Flackern beim Verschieben wahrnimmt; dein Programm zeichnet dein Bild an einer anderen Stelle neu und löscht das alte, daher das Flackern.

Mit DoubleBuffered kann man diesen Effekt grunsätzlich umgehen, es gibt aber Fälle, in denen es nicht funktioniert...

Wenn du immer noch nicht weisst, was gemeint ist:

Nimm eine Shape, lass' sie mittels Timer nach links wandern, indem du im Timer den shape.left - Wert veränderst. Dann siehst du, was mit dem Flackern gemeint ist.

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.
wunsiedler
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 506
Erhaltene Danke: 4

Win7

BeitragVerfasst: So 23.05.04 11:50 
Ich weis was mit dem Flackern gemeint ist, denn es tritt ja bei mir auf. Die Frage ist wie man es wegbekommt. Man liest dann weiter ober immer was von DoubleBuffered. Aber was ist damit? wird hier nicht erklärt. wo kommt's hin, bei mir funktioniert's nicht. Sag ich in FormLoad o.ä. ' DoubleBuffered:=true;' sagt er mir 'kenn ich nicht' mhhh... was tun?
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: So 23.05.04 11:55 
im Formcreate solltest du
ausblenden Delphi-Quelltext
1:
formname.DoubleBuffered := True;					

schreiben können, wobei
ausblenden Delphi-Quelltext
1:
DoubleBuffered := True;					

genauso funktionieren sollte...


welche Delphi-Version hast du denn??
wunsiedler
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 506
Erhaltene Danke: 4

Win7

BeitragVerfasst: So 23.05.04 12:01 
Momentan verwende ich Delphi 3 Prof. zwecks Datenbank, habe aber auch Version 6 PE.
wunsiedler
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 506
Erhaltene Danke: 4

Win7

BeitragVerfasst: So 23.05.04 18:47 
Undefinierter Bezeichner

sagt er mir

mein Code:

ausblenden Quelltext
1:
Form1.DoubleBuffered := True;					
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: So 23.05.04 19:52 
evtl. gabs das bei Delphi3 noch nciht...
in delphi6 aber definitiv...