Autor Beitrag
stigge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 19:52 
Ist es möglich, das die Form erst unsichtbar ist, dann leicht sichtbar, dann stärker und am Ende ganz sichtbar? Also sozusagen ein gestaffelter Aufbau? (Timer?) Gibt's da irgendeine Möglichkeit? :nixweiss:
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 20.03.07 19:53 
such mal nach form und alpha ;) bzw nach alphablendvalue
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Di 20.03.07 19:55 
Ja, mit Form.AlphaBlend:

ausblenden Delphi-Quelltext
1:
2:
Form1.AlphaBlend:=true;
Form1.AlphaValue:=0;


dann halt in nem timer den AlphaValue schrittweise erhöhen..

gruß :r:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 20:01 
user profile iconrizla hat folgendes geschrieben:
Ja, mit Form.AlphaBlend:

ausblenden Delphi-Quelltext
1:
2:
Form1.AlphaBlend:=true;
Form1.AlphaValue:=0;


dann halt in nem timer den AlphaValue schrittweise erhöhen..

gruß :r:

Falsch! Das heißt
ausblenden Delphi-Quelltext
1:
Form1.AlphaBlendValue := 0;					

:mahn: :mahn: :mahn: :mahn: :mahn:
Nur Spass :wink: Danke für die schnelle Hilfe!
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Di 20.03.07 20:01 
Moin,

ich würds mit ner Schleife machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
var i: Byte;
begin
 Form1.AlphaBlendValue := 0;
 for i := 0 to 255 do begin
  Form1.AlphaBlendValue := i;
  Application.ProcessMessages;
  Sleep(10);
  end;
end;


Gruß


Zuletzt bearbeitet von Saubäär am Di 20.03.07 20:06, insgesamt 1-mal bearbeitet
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Di 20.03.07 20:04 
man, ich hab kein delphi hier, aber geholfen hats ja trotzdem :P
dann sind wir ja da, wo du hin wolltest, gelle?
:r:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 20:31 
user profile iconSaubäär hat folgendes geschrieben:
Moin,

ich würds mit ner Schleife machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
var i: Byte;
begin
 Form1.AlphaBlendValue := 0;
 for i := 0 to 255 do begin
  Form1.AlphaBlendValue := i;
  Application.ProcessMessages;
  Sleep(10);
  end;
end;


Gruß

i muss doch auch irgenwann mal erhöht werden, sonst ist's doch eine Endlosschleife, oder?


user profile iconrizla hat folgendes geschrieben:
man, ich hab kein delphi hier, aber geholfen hats ja trotzdem :P
dann sind wir ja da, wo du hin wolltest, gelle?
:r:

Der Code funktioniert noch nicht^^ Ich bekomme immer irgendwelche Lesefehler
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Di 20.03.07 20:34 
aber dieses hier:

ausblenden Delphi-Quelltext
1:
for i := 0 to 255 do begin					


erhöht doch das abvalue..

wie, lesefehler?

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 20:41 
user profile iconrizla hat folgendes geschrieben:
aber dieses hier:

ausblenden Delphi-Quelltext
1:
for i := 0 to 255 do begin					


erhöht doch das abvalue..

wie, lesefehler?

Lesefehler hat sich geklärt, war nur weil ichs bei formcreate drinnen hatte. Ich hab jetzt einen Versuch mit eigenem Code gemacht, klappt aber nicht was ich nicht verstehe:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm2.Timer4Timer(Sender: TObject);
var b: integer;
begin
b := b + 15;
Form2.AlphaBlendValue := b;
if b = 255 then
begin
timer4.Enabled := false;
timer1.enabled := true;
timer2.Enabled := true;
end;
end;

timer-intervall steht auf 50, form2.alphablend ist auch auf true und alphablendvalue ist auf 0. Warum geht das trotzdem nicht???
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Di 20.03.07 20:49 
Moin,

das liegt höchstwahrscheinlich daran, dass die Variable b nicht initialisiert ist. Du musst b mit 0 (oder nem andren Wert) initialisieren.
Außerdem würde ich die if- Abfrage so abändern:

ausblenden Delphi-Quelltext
1:
 if b >= 255 then ...					


Zuletzt bearbeitet von Saubäär am Di 20.03.07 20:50, insgesamt 2-mal bearbeitet
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 20:49 
Und hiermit flakkert die ganze Anwendung:
ausblenden Delphi-Quelltext
1:
2:
For x:=0 to 255 do 
    Form1.AlphaBlendValue:=x;
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 20:51 
user profile iconSaubäär hat folgendes geschrieben:
Moin,

das liegt höchstwahrscheinlich daran, dass die Variable b nicht initialisiert ist. Du musst b mit 0 (oder nem andren Wert) initialisieren.
Außerdem würde ich die if- Abfrage so abändern:

ausblenden Delphi-Quelltext
1:
 if b >= 255 then ...					

Warum sie nicht initialisiert wurde verstehe ich zwar nicht aber wenn ich ihr bei formcreate eine 0 zuweise dann klappts. Danke!
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Di 20.03.07 20:58 
user profile iconstigge hat folgendes geschrieben:

Warum sie nicht initialisiert wurde verstehe ich zwar nicht aber wenn ich ihr bei formcreate eine 0 zuweise dann klappts. Danke!


Wenn du Variablen nicht initialisierst, haben sie den Wert, der im Speicher steht. Kannst es ja mal selber ausprobieren:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.FormActivate(Sender: TObject);
var b: Integer;
begin
 ShowMessage(IntToStr(b)); // höchstwahrscheinlich NICHT = 0
end;


Gruß
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 20.03.07 21:03 
user profile iconSaubäär hat folgendes geschrieben:
user profile iconstigge hat folgendes geschrieben:

Warum sie nicht initialisiert wurde verstehe ich zwar nicht aber wenn ich ihr bei formcreate eine 0 zuweise dann klappts. Danke!


Wenn du Variablen nicht initialisierst, haben sie den Wert, der im Speicher steht. Kannst es ja mal selber ausprobieren:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.FormActivate(Sender: TObject);
var b: Integer;
begin
 ShowMessage(IntToStr(b)); // höchstwahrscheinlich NICHT = 0
end;


Gruß

Eigentlich klappt es sonst :gruebel: ...naja, dann werde ich ab jetzt wohl sicherheitshalber die Variablen initialisieren :zustimm: