Delphi怎么编程实现文件复制、剪切?(不粘贴)
Delphi如何编程实现文件复制、剪切?(不粘贴)
就是如同在操作系统中点中文件后右键弹出菜单,可以“复制”、“剪切”文件到剪贴板?
网上看到的都是直接把一个文件复制到另一个目录下,我只想实现让用户“复制”、“剪切”,至于他最后到操作系统下是不是“粘贴”,不在程序里实现的那种效果?
------解决方案--------------------
http://www.mscto.com/Delphi/27969205.html
参考
------解决方案--------------------
就是如同在操作系统中点中文件后右键弹出菜单,可以“复制”、“剪切”文件到剪贴板?
网上看到的都是直接把一个文件复制到另一个目录下,我只想实现让用户“复制”、“剪切”,至于他最后到操作系统下是不是“粘贴”,不在程序里实现的那种效果?
------解决方案--------------------
http://www.mscto.com/Delphi/27969205.html
参考
------解决方案--------------------
- Delphi(Pascal) code
BOOL CopyFile( LPCTSTR lpExistingFileName, // pointer to name of an existing file LPCTSTR lpNewFileName, // pointer to filename to copy to BOOL bFailIfExists // flag for operation if file exists ); HANDLE CreateFile( LPCTSTR lpFileName, // pointer to name of the file DWORD dwDesiredAccess, // access (read-write) mode DWORD dwShareMode, // share mode LPSECURITY_ATTRIBUTES lpSecurityAttributes, // pointer to security attributes DWORD dwCreationDistribution, // how to create DWORD dwFlagsAndAttributes, // file attributes HANDLE hTemplateFile // handle to file with attributes to copy );