Autor Beitrag
der_zaehe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

WinXP SP2
D6 Pers, D2005 Prof, VS2005
BeitragVerfasst: Mi 09.02.05 13:48 
Hallo!

wie krieg ich es hin, das mein sich die Transparenz meines Forms mit einem Trackbar einstellen lässt?
ich hab das mit folgendem code versucht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.TrackBarAlphaChange(Sender: TObject);
begin
  Form1.AlphaBlendValue := HI(TrackBarAlpha.Position);
end;


ich krieg dann allerding noch beim starten einen AccesViolaton, allerdings net von meinem hauptform form1, sondern von einem anderen form, form2.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
program ZChat;

uses
  Forms,
  ZChat_unit in 'ZChat_unit.pas' {Form1},
  ZChat_unit_privat in 'ZChat_unit_privat.pas' {Form2};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2); // => hier entsteht der fehler
  Application.Run;
end.


was mach ich da falsch?
schon mal danke für eure antworten

_________________
[inspirationslos]
der_zaehe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

WinXP SP2
D6 Pers, D2005 Prof, VS2005
BeitragVerfasst: Mi 09.02.05 13:54 
so, mein prob hat sich gelöst, indem ich statt Form1.AlphaBlendValue := HI(TrackBarAlpha.Position); einfach  AlphaBlendValue := TrackBarAlpha.Position; geschrieben hab,
Hab aber trotz allem nicht verstanden, warum das eine nen fehler gibt und das andere nicht.
Kann mir das jemand erklären?

_________________
[inspirationslos]