Autor Beitrag
dnk05
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: So 27.02.05 17:54 
Hallo!

Ich möchte ein Programm machen, bei dem ich einen Text in ein Memo-Feld eingebe, dann auf ein Button drücke.
Dabei möchte ich, dass sich ein neues Formular öffnet (bis dahin natürlich kein Problem), auf dem der eingegebene Text unten als Ticker angezeigt wird, d.h. durchläuft von rechts nach links.

(wer es sich nicht vorstellen kann: wie z.b. bei Wetten Dass der Abspann, wo auch nur der Text mit den Namen von rechts nach links im unteren Rand duchläuft)

Wär echt toll wenn ihr mir helfen könntet!

thx, dnk05
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:00 
Du könntest ein Label verwenden, dessen Left-Eigenschaft du veränderst. Oder du änderst den Text immer um einen Buchstaben (siehtaber holpriger aus).
Die Zeitsteuerung machst du mit einem Timer.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:03 
Also... :D
In Form1
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.Button1Click(Sender: TObject);
begin
  s:=Form1.Memo1.Lines.Text;
  Form2.Show;
  Form2.Timer1.Enabled:=True;
end;
und in Form2
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm2.Timer1Timer(Sender: TObject);
var
  s : string;
begin
  Delete(s,1,1);
  Label1.Caption:=s;
end;


//Die oben genannte Funktion lässt den Text ablaufen und wenn nichts mehr da ist passiert auch nichts mehr....
//Anders ist der Code, wenn du Es in einer Schleife laufen lassen willst

In Form 2 lautet er dann wie folgt beim Timer
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm2.Timer1Timer(Sender: TObject);
var
  s : string;
begin
  s:=s+s[1];
  Delete(s,1,1);
  Label1.Caption:=s;
end;



//Edit s:string muss irgentwie global an Form 2 Übergeben werden muss noch gucken wie ergänze ich gleich
//Edit2 Und man darf keinen Absatz drinnhaben... Sonst sieht das was dämlich aus...

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:10 
Verbesserung:
In Form1
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.Show;
  Form2.Timer1.Enabled:=True;
end;

und in Form2
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm2.FormShow(Sender: TObject);
var
  s : string;
begin
  s := Form1.Memo1.Lines.Text;
end;

procedure TForm2.Timer1Timer(Sender: TObject);
begin
  if Length(s) > 0 then
  begin 
    Delete(s,1,1);
    Label1.Caption := s;
  end else
  Label1.Caption := Form1.Memo1.Lines.Text;
end;


Und hier, wenn du die Left-Eigenschaft verändern willst:
In Form1
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.Show;
  Form2.Timer1.Enabled:=True;
end;

und in Form2
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm2.FormShow(Sender: TObject);
begin
  Label1.Caption := Form1.Memo1.Lines.Text;
end;

procedure TForm2.Timer1Timer(Sender: TObject);
begin
  if Label1.Left = (- Label1.Width) then
  Label1.Left := Form2.ClientWidth else
  Label1.Left := Label1.Left - 1;
end;

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG


Zuletzt bearbeitet von Radioactive am So 27.02.05 18:15, insgesamt 2-mal bearbeitet
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:13 
:) Wird er wohl kaum machen deine Funktion

Radioactive hat folgendes geschrieben:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm2.FormShow(Sender: TObject);
var
  s : string;
begin
  s := Form1.Memo1.Lines.Text;
end;

procedure TForm2.Timer1Timer(Sender: TObject);
begin
  if Length(s) < 0 then
  begin 
    Delete(s,1,1);
    Label1.Caption := s;
  end else
  Label1.Caption := Form1.Memo1.Lines.Text;
end;


Gut er müsste theoretisch von vorne Anfangen aber ich bezweifle das er überhaupt was macht... muss es nicht heißen  if Length(s) > 0 then :wink:
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:16 
OK, dass mit der Length habe ich falsch gemacht.
Aber der Rest passt.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:19 
JO wollt dich net angreifen sollte spassig gemeint sein k?^^ :wink:
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:23 
Ich LIEBE Spaß-Freunde wie dich! :D Na egal, auch ich bin nur ein Mensch und Irren ist menschlich.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:24 
:lol: kk kann ich verstehen (Spaß-Freunde ???)
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:26 
Spass-Freunde = Spaß-Freunde = Leute, die Spass lieben und ihn auch anwenden

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:29 
:lol: Man ich hab ja schon einiges gehört aba das noch net... aber am ende.. man muss ja nur mal nachdenken... schwer wenn man Faul ist :D
dnk05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: So 27.02.05 18:30 
danke ihr spaßfreunde!!! :D
dnk05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: So 27.02.05 18:31 
Larus hat folgendes geschrieben:
:lol: Man ich hab ja schon einiges gehört aba das noch net... aber am ende.. man muss ja nur mal nachdenken... schwer wenn man Faul ist :D


1. Stimmt, bin faul.

2. Bin ein Delphi-Anfänger, wollte aber doch wissen wie das geht, weil ich das bald brauch.

3. Kann ja sein, dass jemand sowas schon gemacht hat, wieso soll ich dann nachdenken? :lol:
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:31 
Bitte bidde hauptsache es funzt... Tuts das bei dir... bei mir wohl ;)
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:33 
Wenn du es für die schule brauchst sag ich nur eins..... Wir machen keine Hausaufgaben für dich aber wenn du ein Problem hast und du sagen kannst wo es liegt (und auch erst dann) wird man dir helfen :)
dnk05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: So 27.02.05 18:37 
Nein brauchs nicht für die Schule...

Ich möchte damit emails auf einem Fernsehbild (während einer Live-Sendung) anzeigen.
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 27.02.05 18:40 
Also was für die super-faulen: Man hockt sich nicht mehr an den Computer sondern ließt sich seine E-Mails während dem Fernsehschauen durch. :D lol Das gefällt mir.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:40 
MOMOMOMOMOMentmal..... wie willse das nu wieder hinkriegen :?: :?: :?:

Radioactive hat folgendes geschrieben:
Also was für die super-faulen: Man hockt sich nicht mehr an den Computer sondern ließt sich seine E-Mails während dem Fernsehschauen durch. :D lol Das gefällt mir.


Du bist da net der einzige dem das gefällt :tongue:
dnk05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 40


D3 Prof
BeitragVerfasst: So 27.02.05 18:48 
Naja, so wärs auch net schlecht, aber wie ich meine: :wink:

wir machen in regelmäßigen abständen im Offenen Kanal hier eine Live-Call-In-Sendung.
Und da will ich es so machen, dass die Emails auf einem blauen Formular "laufen" (also der ticker).

Und das blaue wird ausgeschlossen, also transparent.
(der berühmte "Bluebox-Effekt").

und dafür brauch ich den ticker.

:o
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:50 
dnk05 hat folgendes geschrieben:
...
wir machen in regelmäßigen abständen im Offenen Kanal hier eine Live-Call-In-Sendung.
Und da will ich es so machen, dass die Emails auf einem blauen Formular "laufen" (also der ticker).
...


Frage: Wer ist wir? wie willse das über das Bild der Sendung legen?