//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "ExpandFileName.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: ExpandFileName
// Routine: SysUtils.ExpandFileName

// BeginCode
/*
The following example uses a listbox, an edit control, and a
button on a form. When the button is clicked, the filename
specified in the edit control is expanded to a fully 
qualified filename and added to the list box.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  ListBox1->Items->Add(ExpandFileName(Edit1->Text));
}

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Label2->Caption = ExtractFilePath(Application->ExeName);
}
// EndCode
// EndExample: ExpandFileName
//---------------------------------------------------------------------------
