谢谢
解决方案 »
- delphi中TCollection是如何实现用下标存取TCollectionItem的
- 将带有条形码的纸扫描保存成bmp图后,怎样识别条形码?
- interbase数据库是一个免费的吧?
- 如何读取image控件中的图片某点的Alpha值呢?这条语句如何写呢?
- 向大家推荐一本好书:
- 如何在Button中点击左健相应右健处理事件
- SQL中参数的问题
- delphi的 组件的安装问题
- 我定义了一个类,在类中要怎么定义一个成员函数
- 在程序中要用到‘eKeyviol’,但编译时说没有定议,请‘eKeyviol’在哪个文件中被定义了。谢谢。在程序中要用到‘eKeyviol’,但编译时说没有定议,请‘eKeyviol’在哪个文件中被定义了。谢谢。
- 清华大学计算机系全部教程(视频版)谁要???
- FindWindowEx如何查找出SpeedButton按钮的句柄?
sToDirName:String):Boolean;
var
hFindFile:Cardinal;
t,tfile:String;
sCurDir:String[255];
FindFileData:WIN32_FIND_DATA;
begin
//先保存当前目录
sCurDir:=GetCurrentDir;
ChDir(sDirName);
hFindFile:=FindFirstFile('*.*',FindFileData);
if hFindFile <>INVALID_HANDLE_VALUE then
begin
if not DirectoryExists(sToDirName) then
ForceDirectories(sToDirName);
repeat
tfile:=FindFileData.cFileName;
if (tfile='.') or (tfile='..') then
Continue;
if FindFileData.dwFileAttributes=
FILE_ATTRIBUTE_DIRECTORY then
begin
t:=sToDirName+'\'+tfile;
if not DirectoryExists(t) then
ForceDirectories(t);
if sDirName[Length(sDirName)] <> '\' then
DoCopyDir(sDirName+'\'+tfile,t)
else
DoCopyDir(sDirName+tfile,sToDirName+tfile);
end
else
begin
t:=sToDirName+'\'+tFile;
CopyFile(PChar(tfile),PChar(t),True);
end;
until FindNextFile(hFindFile,FindFileData)=false;
Windows.FindClose(hFindFile);
end
else
begin
ChDir(sCurDir);
result:=false;
exit;
end;
//回到原来的目录下
ChDir(sCurDir);
result:=true;
end;