Autor Beitrag
Ivo@CoMRoK
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Sa 27.05.06 19:33 
Hallo erstmal!
Ich hab ein Problem und zwar:
Ich will, dass wenn ein bestimmtes Fenster geöffnet wird (nicht das eigene), dieses geschlossen wird.
Nun wollte ich die Screen.OnActiveFormChange meiner eigenen Prozedur zuweisen jedoch funktioniert dies nicht.
Hier mein Source:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.FormCreate(Sender: TObject);
begin
  Form1.Eins(Sender) := Screen.OnActiveFormChange(Sender);
end;

procedure TForm1.Eins(Sender: TObject);
begin
  if screen.ActiveForm.Caption = Edit1.Text then screen.ActiveForm.Close;
end;


Kann mir jemand weiterhelfen?
Danke

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.
Ivo@CoMRoK Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: So 28.05.06 20:36 
Hat keiner ne Ahnung?
Ich mein man kann doch einer eigenen Prozedur ne application.On.. zuweisen gibts keine Möglichkeit sowas auch bei screen.On.. zu machen?

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.
The Who
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 25

Win XP Prof
D3 Prof, D8, D7E
BeitragVerfasst: So 28.05.06 21:17 
Kann es sein das du es so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormCreate(Sender: TObject);
begin
  Screen.OnActiveFormChange := Form1.Eins;
end;


machen willst.
Du willst doch screen.OnActiveFormChange die Procedure Eins zuweisen oder ?
Ivo@CoMRoK Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Mo 29.05.06 12:56 
Öhmm .. ja genau das wars.
Danke! :zustimm:
Nur .. naja es passiert nichts und wenn ich das Programm beende krieg ich ne Fehlermeldung.
Das screen.ActiveForm.Close is doch richtig oder?

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.