Autor Beitrag
jmschloemer
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Di 06.09.05 23:02 
Hallo,
ich bin noch ziemlich unerfahren mit dem Umgang von Delphi und wurde gerne wissen,
wie ich einen Hintergrundfarbwechsel bzw. ein blinken des Hintergrundes in verschiedenen
Farben hinbekomme.
Ich habe schon im FAQ etc. gesucht aber leider keine Lösung gefunden.

Ich hoffe auf eure Mithilfe. :roll:


Moderiert von user profile iconKlabautermann: Topic aus VisualCLX (Component Library for Cross Platform) verschoben am Mi 07.09.2005 um 00:44
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Di 06.09.05 23:24 
Hi und :welcome: im DF!

Fenster rot machen:
Color := clRed;

Das Blinken könntest du mir einem Timer erreichen.
jmschloemer Threadstarter
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Mi 07.09.05 05:47 
Danke für die schnelle Antwort könntest mir ja vielleicht einen Quellcode geben, damit das nachvollziehen kann.

Wäre echt super
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mi 07.09.05 08:39 
Du setzt die Farbe deiner Form auf einen Anfangswert, z.B. :

ausblenden Delphi-Quelltext
1:
Form1.color = clRed;					


Dann nimmst du einen Timer (das ist eine Komponente, die periodisch einen bestimmten Quellcode ausführt) und schreibt in das Ereignis des Timers einen Code, der den Farbwechsel bestimmt, z.B. :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
If Form1.color = clRed Then 
Form1.color := clGreen;
Else
Form1.color := clRed;
End If;
jmschloemer Threadstarter
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Mi 07.09.05 22:03 
Hallo,
und vielen Dank für die schnelle Antwort.

Grüße
Malte
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 08.09.05 10:06 
Hi,
user profile iconazubi_20 hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
If Form1.color = clRed Then 
Form1.color := clGreen;
Else
Form1.color := clRed;
End If;


welche sprache ist denn das? Delphi mag z.B. keine Semikola vor dem else und ein End if ist auch nicht seine Sache ;).

Gruß
Klabautermann
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Do 08.09.05 10:19 
Zitat:
welche sprache ist denn das?


Ähh, ja vielleicht Delpibasic :wink:
Nee, mal im Ernst, bin da wohl ein bischen durcheinander gekommen. Das kommt davon wenn man mit Delphi, VB und ABAP gleichzeitig arbeiten muss und gerade keine IDE zum Testen da hat. :oops:

So müsste es wohl richtig sein :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
If Form1.color = clRed Then 
Form1.color := clGreen
Else
Form1.color := clRed;