Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi activecontrol.name ? (https://www.delphipraxis.net/127931-activecontrol-name.html)

thomas2009 21. Jan 2009 14:52


activecontrol.name ?
 
Hallo

kann jemand mir sagen, warum ich den fehler erhalte, wenn ich die Taste Enter drücke ?
Delphi-Quellcode:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Ord(Key) = VK_RETURN then
   Caption:=Form1.activecontrol.name;
end;

Bernhard Geyer 21. Jan 2009 14:55

Re: activecontrol.name ?
 
Welchen Fehler?

toms 21. Jan 2009 14:58

Re: activecontrol.name ?
 
Mache eine Überprüfung, ob ActiveControl <> nil ist (resp mit Assigned)


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:19 Uhr.

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