Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi onShow (https://www.delphipraxis.net/22052-onshow.html)

Pseudemys Nelsoni 11. Mai 2004 20:37


onShow
 
Moin,

Delphi-Quellcode:
Type
  TStatusWindowClass = class(TObject)
  private
    StatusWindow: TForm;
    StatusBox: TRichEdit;
    StatusTextBox: TEdit;
    procedure StatusWindowShow;
  public
    procedure CreateStatusWindow;
  end;

implementation

procedure TStatusWindowClass.CreateStatusWindow;
begin
  StatusWindow := TForm.Create(nil);
  StatusWindow.OnShow := StatusWindowShow;
end;

procedure StatusWindowShow;
begin

end;

mit :

Delphi-Quellcode:
procedure StatusWindow.StatusWindowShow;
begin

end;
Damit gehts auch nicht :(


Sagt mir jemand was daran nicht funzt? Ich wollte dass OnShow event definieren, aber ist wohl falsch :(

fehler ist/sind:

Zitat:

[Fehler] IRC.pas(26): Inkompatible Typen: 'Liste der Parameter ist unterschiedlich'
[Fehler] IRC.pas(14): Ungenügende Forward- oder External-Deklaration: 'TStatusWindowClass.StatusWindowShow'
[Fataler Fehler] Project1.dpr(6): Verwendete Unit 'IRC.pas' kann nicht compiliert werden
[Pascal Fehler] IRC.pas(1): Die Programmierhilfe kann nicht aufgerufen werden, da der Quelltext Fehler enthält

Markus K. 11. Mai 2004 20:44

Re: onShow
 
Hallo Pseudemys Nelsoni,
so müsste es gehen.

Delphi-Quellcode:
  TStatusWindowClass = class(TObject)
  private
    StatusWindow: TForm;
    StatusBox: TRichEdit;
    StatusTextBox: TEdit;
    procedure StatusWindowShow(Sender:TObject);
  public
    procedure CreateStatusWindow;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TStatusWindowClass.CreateStatusWindow;
begin
  StatusWindow := TForm.Create(nil);
  StatusWindow.OnShow := StatusWindowShow;
end;

procedure TStatusWindowClass.StatusWindowShow(Sender:TObject);
begin

end;
Tschüß Markus

SirThornberry 11. Mai 2004 20:46

Re: onShow
 
Die Methode muss vom Type TNotifyEvent sein (Siehe OH)


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz