リストボックスにテキストファイルの内容を表示するサンプルです。
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
AnsiString str;
str = ExtractFilePath(Application->ExeName) + "work.txt";
ListBox1->Items->LoadFromFile(str);
}
//---------------------------------------------------------------------------
DownLoad bcbtips058.lzh 8KB(BCB5)