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

#include <vcl.h>
#pragma hdrstop

#include "TOpenDialogTitle.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: TOpenDialogTitle
// Property: Dialogs.TOpenDialog.Title
// Property: Dialogs.TOpenDialog.FileName
// Routine: SysUtils.DeleteFile
// BeginCode
/*
Click the button to open a TOpenDialog, then select a file 
to delete.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  OpenDialog1->Title = "Delete File";
  if (OpenDialog1->Execute())
  {
	if (FileExists(OpenDialog1->FileName))
	  DeleteFile(OpenDialog1->FileName);
  }
}
// EndCode
// EndExample: TOpenDialogTitle
//---------------------------------------------------------------------------
