-4

I have been facing this error for like 30 mins and I can't find a solution. Can someone please help me?

Error line in Delphi IDE

var line in Delphi IDE

I tried to google for a solution, but I couldn't find one.

1 Answer 1

1

TForm is declared in the VCL's Forms unit, which is missing in the uses clause of your unit's interface section. That is why you are getting an error about TForm being undeclared.

Fixing that should solve the errors about Perform() and Close(), too.

Regarding the other "undeclared identifier" errors:

  • clWindow is declared in the Graphics unit.

  • FormatDateTime(), Now(), and DateToStr() are declared in the SysUtils unit.

  • MessageDlg() is declared in the Dialogs unit.

Make sure those units are in your uses clause as well, preferably in your unit's implementation section rather than in its interface section.

5
  • That project is old one month, compiled, working and added to ZIP archive because I had to reinstall OS. Now, trying to fix some bugs and build again and errors appear. I every form.
    – AckeeXZ
    Jun 8 at 20:52
  • @AckeeXZ all I can tell you is what I see in the images you provided. The Forms unit must be in the uses clause of the interface section in order for the TformaZaduzenje = class(TForm) statement to compile properly. But Forms is missing in the image you provided. Jun 8 at 20:56
  • Yup, fixed! Thank you so much! <3
    – AckeeXZ
    Jun 8 at 21:01
  • note: it is discouraged to answer questions with significant content problems. See /help/how-to-answer and meta.stackoverflow.com/a/285557/11107541
    – starball
    Jun 9 at 1:40
  • @AckeeXZ Better use a SCM independant from your dev machine Jun 9 at 5:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.