Autor Beitrag
N47R0N
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 134



BeitragVerfasst: Mo 25.12.06 22:02 
Hi leute.

ich hab da mal eine kleine frage unzwar folgende:

ich habe vor in mein Programm einen regler einzubauen mitdem man die Transparens der Form einstellen kann. Hab eine Trackbar genommen und es so eingestellt, dass immer wenn der regler umgestellt wird, die Transparens der Form auf die Zahl gestellt wird auf der sich der Regler gerade befindet.

Hab bei der Trackbar 255 unter Max eingetragen (wie das Maximale bei der Form Alphablend einstellung)und hier mein code dazu:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.TrackBar2Change(Sender: TObject);
var
a:boolean;
b:string;
begin
b:=inttostr(TrackBar2.Position);
a:=strtobool(b);
Form1.AlphaBlend:=a;
end;


ich weiß der code sieht umständlich aus, ich habs aber noch nicht so recht drauf also helft mir bidde ^^.

danke für alles......

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 25.12.06 22:39 
Probiers mal So.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
  Trackbar1.Max:=255;
  i:= Trackbar1.Max - Trackbar1.Position;
  Form1.AlphaBlendValue:=i;
end;

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 25.12.06 22:41 
aber wenn dein formular nicht mehr sichtbar ist, kannst du es auch nicht wieder sichtbar machen, also würde ich einen minimal wert einbauen.
N47R0N Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 134



BeitragVerfasst: Mo 25.12.06 23:06 
okey thx hab mich also verschrieben beim setzen des wertes