Einzelnen Beitrag anzeigen

Mokuba01

Registriert seit: 26. Jan 2007
Ort: Neupetershain
76 Beiträge
 
Delphi XE2 Professional
 

Re: Automatische Bildanpassung

  Alt 7. Feb 2008, 20:06
Das haben wir zwar schon mehrfach durchgekaut aber naja...

Delphi-Quellcode:
procedure TForm1.Vollbild;
var
  HTaskbar: HWND;
  OldVal: LongInt;
begin
oldW := Width;
oldH := Height;
oldX := Left;
oldY := Top;
BorderStyle := bsNone;
FormStyle := fsStayOnTop;
Left := 0;
Top := 0;
Height := Screen.Height;
Width := Screen.Width;
end;
Und rückgängig:

Delphi-Quellcode:
procedure TForm1.Normalmodus;
var
  HTaskbar: HWND;
  OldVal: LongInt;
begin
BorderStyle := bsSizeable;
FormStyle := fsNormal;
Left := oldX;
Top := oldY;
Height := oldH;
Width := oldW;
end;
folgende Variabeln müssen global deklariert werden:
oldX
oldY
oldH
oldW

Ich hoffe dass ich dir helfen konnte...
Gruß Mokuba01
  Mit Zitat antworten Zitat