Delphi¿½±´Ä¿Â¼(º¬×ÓĿ¼)µÄ·½·¨
Delphi¿½±´Ä¿Â¼(º¬×ÓĿ¼)µÄ·½·¨
ҪʵÏÖĿ¼¼¶µÄ¿½±´£¬¿ÉÒÔÀûÓÃWindows APIº¯ÊýShFileOperation( )£¬Æ亯ÊýÉùÃ÷ÈçÏ£º
WINSHELLAPI int WINAPI SHFileOperation(
LPSHFILEOPSTRUCT lpFileOp
);
ʵÀý£º
н¨Ò»¸ö¹¤³Ì£¬Æä³ÌÐòʾÀýÈçÏ£º
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,ShellApi;
//×¢Ò⣺±ØÐëÒýÓÃShellApiµ¥Ôª
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender:TObject);
var
OpStruc:TSHFileOpStruct;
frombuf,tobuf:Array[0..128]of Char;
begin
FillChar(frombuf,Sizeof(frombuf),0);
FillChar(tobuf,sizeof(tobuf),0);
//¼ÙÉ轫C:\temp1Ŀ¼ÏµÄËùÓÐÎļþ¸´ÖƵ½C:\temp2Ŀ¼ÏÂ
StrPCopy(frombuf,'C:\temp1\*.*'); //(\*.*)¿ÉÈ¥µô
StrPCopy(tobuf,'C:\temp2');
With OpStruc Do
begin
Wnd:=Handle;
wFunc:=FO_COPY;
pfrom:=@frombuf;
pTo:=@tobuf;
fFlags:=FOF_NOCONFIRMATION or FOF_RENAMEONCOLLISION;
fAnyOperationsAborted:=false;
hNameMappings:=Nil;
lpszProgressTitle:=Nil;
end;
ShFileOperation(OpStruc);
end;
end.
ͨ¹ý±¾³ÌÐò£¬¿ÉÒÔ½«Ä³Ò»×ÓĿ¼¼°ÆäÏÂÃæµÄËùÓÐÎļþ£¨°üÀ¨Ï¼¶×ÓĿ¼£©¿½±´µ½ÁíÒ»¸ö×ÓĿ¼£¬Èç¹ûÄ¿±êĿ¼²»´æÔÚ£¬Ôò»á×Ô¶¯´´½¨Ëü£¬´Ó¶øʵ¼ÊһЩ×Ô¶¯±¸·ÝµÄ¹¦ÄÜ¡£
Ïà¹ØÎĵµ£º
Day ¿ªÍ·µÄº¯Êý
¡ñ
Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
ÃèÊö
ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö
Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£
ÀýÈ磺
showmessage(DateTimetostr(dateof(now())));
ÄãµÃµ½µÄÊÇ 2003/03/19
¶ø showmessage(Dat ......
Èý²ã¼Ü¹¹Ö¸µÄÊǽçÃ棬ҵÎñÂß¼ºÍÊý¾Ý´æ´¢·ÖÀë,²»ÊÇÖ¸ÎïÀíÉÏÊÇ·ñ·ÖÀë¡£
ÕâÑù×öµÄºÃ´¦ÊDzã´Î·ÖÃ÷£¬Î¬»¤ºÃ×ö£¬ÏµÍ³×ÊÔ´Ò²ºÃ·Ö²¼Ê½´¦Àí¡£
Êý¾Ý¿â²ãÄľͲ»ËµÁË£¬ÓÃMSSQL¡¢OrcaleËæÄãÁË£¬¾ÍÊÇÊý¾Ý·þÎñ²ã
ÒµÎñÂß¼µÄ»°Òª·ÖÎöÇå³þ£¬¾ÍÊÇÖмä²ã
½çÃ棬Ҳ½Ð¿Í»§¶Ë¡£ÕâÀï¾ÍÊǵõ½Êý¾ÝºÍÏÔʾÊý¾ÝµÄ²¿·ÖÁË£¬²»×öÆäËü´¦Àí¡£µ«ÊÇÊý¾ÝÓÐ ......
ExpressQuantumGrid.Suite.v6.30 ÔÚDelphi 7Öеݲװ
´óÃû¶¦¶¦µÄGrid¿Ø¼þ£¬Ã»ÓÐÕÒµ½´òºÃ°üµÄ£¬ÒÔÏÂÊÇÊÖ¶¯°²×°²½Öè
=====================
1¡¢±ØÐëÅäÌ×°²×°ÈçÏÂ7×é¿Ø¼þ£¬ÒѾ°²×°¹ýµÄÔòÌø¹ý
XP Theme Manager
ExpressGDI+ Library
ExpressLibrary
ExpressExport Library
ExpressDataController
ExpressEditors Lib ......
Ï̵߳Ļù´¡ÖªÊ¶
Ï̵߳Ä×é³É¡£Ïß³ÌÓÐÁ½²¿·Ö×é³É¡£
1¡¢Ò»¸öÊÇÏ̵߳ÄÄں˶ÔÏ󣬲Ù×÷ϵͳÓÃËüÀ´¶ÔÏß³Ìʵʩ¹ÜÀí¡£Äں˶ÔÏóÒ²ÊÇϵͳÓÃÀ´´æ·ÅÏß³Ìͳ¼ÆÐÅÏ¢µÄµØ·½¡£
2¡¢ÁíÒ»¸öÊÇÏ̶߳ÑÕ»£¬ËüÓÃÓÚά»¤Ïß³ÌÔÚÖ´ÐдúÂëʱÐèÒªµÄËùÓк¯Êý²ÎÊýºÍ¾Ö² ......
DelphiÖÐʵÏÖÎļþ¿½±´µÄÈýÖÖ·½·¨
1£®µ÷ÓÃAPIº¯Êý
procedure CopyFile(fromFileName,ToFileName:string);
var
f1,f2:file;
Begin
AssignFile(f1,fromFileName); file://Ö¸¶¨Ô´ÎļþÃû
AssignFile(f2,ToFileName); file://Ö¸¶¨Ä¿±êÎļþÃû
Reset(f1);
Try
Rewrite(f2);
Try
If Lzcopy(TfileRec(f1).handle,TfileRe ......