// 测试 procedure TfrmMain.btnExeClick(Sender: TObject); begin try mmLine.Lines.Add(ExtractFileDir(Application.Exename)); //返回值为 c:\cts mmLine.Lines.Add(ExtractFilePath(Application.Exename)); //返回值为 c:\cts\ finally end; end;
// 测试 procedure TfrmMain.btnExeClick(Sender: TObject); begin try mmLine.Lines.Add(ExtractFileDir(Application.Exename)); //返回值为 c:\cts mmLine.Lines.Add(ExtractFilePath(Application.Exename)); //返回值为 c:\cts\ finally end; end;