-2

According to their own documentation Application.ExeName should exist.

https://docwiki.embarcadero.com/CodeExamples/Alexandria/en/ExeName_(Delphi)

All the documentation I could find on the internet points to this, but in my IDE it doesn't exist!

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Greg T
  • 122
  • 7
  • 3
    Did you, by chance, create an FMX Multi-Device project? `Application.ExeName` exists only in a VCL project. For FMX (and VCL), you can use [`ParamStr(0)`](https://docwiki.embarcadero.com/Libraries/en/System.ParamStr) instead. – Remy Lebeau Mar 25 '23 at 15:55
  • 1
    And have you included the `Forms` unit? – Andreas Rejbrand Mar 25 '23 at 15:55
  • Documentation should have made this more clear. Thank you Remy Lebeau for this answer. – Greg T Mar 25 '23 at 16:24
  • 1
    https://en.delphipraxis.net/ or check my profile for other social media related to Delphi – Delphi Coder Mar 25 '23 at 16:49
  • I downvoted because the basic knowledge is that [EXE is a format for Windows](https://en.wikipedia.org/wiki/.exe) while [FireMonkey/FMX supports multiple operating systems](https://en.wikipedia.org/wiki/FireMonkey), which have their own executable formats - calling it everywhere "exe" would be as wrong as wrong as expecting every OS to have drive letters. – AmigoJack Mar 26 '23 at 21:33

1 Answers1

0

Did you, by chance, create an FMX Multi-Device project? Application.ExeName exists only in a VCL project. For FMX (and VCL), you can use ParamStr(0) instead

Yes, this is a FMX Multi-Device project.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Greg T
  • 122
  • 7