Einzelnen Beitrag anzeigen

shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#20

AW: Form wird bei onCreate nicht angezeigt

  Alt 23. Feb 2012, 17:11
Nimm erstmal die benannte Instanz da raus, wenn es sich um TForm33 handelt, dann greift man nicht auf Form33 zu, sondern auf self.
Das hat blondervolker jetzt bestimmt nicht verstanden, obwohl das ein ganz wichtiger Hinweis ist.
Delphi-Quellcode:
procedure TForm33.FormCreate(Sender: TObject);
begin
  // FALSCH !
  Form33.Height := (Form33.ClientHeight* y div ScreenHeightDev) +
                                Form33.Height- Form33.ClientHeight;

  // Richtig
  self.Height := (self.ClientHeight* y div ScreenHeightDev) +
                                self.Height- self.ClientHeight;

  // Auch richtig
  Height := (ClientHeight* y div ScreenHeightDev) +
                                Height- ClientHeight;
Andreas
  Mit Zitat antworten Zitat