Einzelnen Beitrag anzeigen

Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#7

Re: Wie komme ich an das RECT für SystemParametersInfo

  Alt 9. Apr 2004, 22:03
Hi!

Mach es so:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var
  rect: PRect;
begin
  rect^.Left := 100;
  rect^.Top := 100;
  rect^.Right := 200;
  rect^.Bottom := 200;
  Form1.Constraints.MaxHeight := 30;
  Form1.Constraints.MinHeight := 30;
  Form1.Constraints.MinWidth := Screen.Width;
  //SystemParametersInfoA();
  //SystemParametersInfoW();
  SystemParametersInfo(SPI_SETWORKAREA, Screen.Height - Form1.Constraints.MaxHeight, rect, SPIF_UPDATEINIFILE);
end;
oder so:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var
  rect: TRect;
begin
  rect.Left := 100;
  rect.Top := 100;
  rect.Right := 200;
  rect.Bottom := 200;
  Form1.Constraints.MaxHeight := 30;
  Form1.Constraints.MinHeight := 30;
  Form1.Constraints.MinWidth := Screen.Width;
  //SystemParametersInfoA();
  //SystemParametersInfoW();
  SystemParametersInfo(SPI_SETWORKAREA, Screen.Height - Form1.Constraints.MaxHeight, @rect, SPIF_UPDATEINIFILE);
end;
Sollte funktionieren (hoffe ich zumindest mal )

mfG
mirage228
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)