2008-03-13

TStringList 切割字串

TStringList* TempList=new TStringList();
TempList->Delimiter='\\';
TempList->DelimitedText=Application->ExeName;
Edit1->Text=TempList->Strings[(TempList->Count-2)];
delete TempList; // destroy the list object

-2是為了顯示目前資料夾名稱

沒有留言: