Copyright © 2013
5. Pobieranie sciezki do programu. [C++Builder XE4] [04.12.2013]

Odczyt sciezki do programu w Visual Component Library (VCL) oraz w FireMonkey application platform (FMX)

Przyklad dla VCL:

//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Edit1->Text = ExtractFilePath(Application->ExeName);
}
//---------------------------------------------------------------------------

Przyklad dla FMX:

//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Edit1->Text = ExtractFilePath(ParamStr(0));
}
//---------------------------------------------------------------------------

Znajdz na stronie: