Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi»ù´¡¿ª·¢¼¼ÇÉ(1)

http://developer.51cto.com/art/200510/7205.htm
[DELPHI]ÍøÂçÁÚ¾Ó¸´ÖÆÎļþ
uses shellapi;
copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false);
[DELPHI]²úÉúÊó±êÍ϶¯Ð§¹û
ͨ¹ýMouseMoveʼþ¡¢DragOverʼþ¡¢EndDragʼþʵÏÖ,ÀýÈçÔÚPANELÉϵÄLABEL:
var xpanel,ypanel,xlabel,ylabel:integer;
PANELµÄMouseMoveʼþ:xpanel:=x;ypanel:=y;
PANELµÄDragOver ʼþ:xpanel:=x;ypanel:=y;
LABELµÄMouseMoveʼþ:xlabel:=x;ylabel:=y;
LABELµÄEndDrag ʼþ:label.left:=xpanel-xlabel;label.top:=ypanel-ylabel;
[DELPHI]È¡µÃWINDOWSĿ¼
uses shellapi;
var windir:array[0..255] of char;
getwindowsdirectory(windir,sizeof(windir));
»òÕß´Ó×¢²á±íÖжÁÈ¡,λÖÃ:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
SystemRoot¼ü,È¡µÃÈç:C:\WINDOWS
[DELPHI]ÔÚFORM»òÆäËûÈÝÆ÷ÉÏ»­Ïß
var x,y:array [0..50] of integer;
canvas.pen.color:=clred;
canvas.pen.style:=psDash;
form1.canvas.moveto(trunc(x[i]),trunc(y[i]));
form1.canvas.lineto(trunc(x[j]),trunc(y[j]));
[DELPHI]×Ö·û´®ÁбíʹÓÃ
var tips:tstringlist;
tips:=tstringlist.create;
tips.loadfromfile('filename.txt');
edit1.text:=tips[0];
tips.add('last line addition string');
tips.insert(1,'insert string at NO 2 line');
tips.savetofile('newfile.txt');
tips.free;
[DELPHI]¼òµ¥µÄ¼ôÌù°å²Ù×÷
richedit1.selectall;
richedit1.copytoclipboard;
richedit1.cuttoclipboard;
edit1.pastefromclipboard;
[DELPHI]¹ØÓÚÎļþ¡¢Ä¿Â¼²Ù×÷
Chdir('c:\abcdir');תµ½Ä¿Â¼
Mkdir('dirname');½¨Á¢Ä¿Â¼
Rmdir('dirname');ɾ³ýĿ¼
GetCurrentDir;//È¡µ±Ç°Ä¿Â¼Ãû,ÎÞ'\'
Getdir(0,s);//È¡¹¤×÷Ŀ¼Ãûs:='c:\abcdir';
Deletfile('abc.txt');//ɾ³ýÎļþ
Renamefile('old.txt','new.txt');//Îļþ¸üÃû
ExtractFilename(filelistbox1.filename);//È¡ÎļþÃû
ExtractFileExt(filelistbox1.filename);//È¡Îļþºó׺
[DELPHI]´¦ÀíÎļþÊôÐÔ
attr:=filegetattr(filelistbox1.filename);
if (attr and faReadonly)=faReadonly then ... //Ö»¶Á
if (attr and faSysfile)=faSysfile then ... //ϵͳ
if (attr and faArchive)=faArchive then ... //´æµµ
if (attr and faHidden)=faHidden then ... //Òþ²


Ïà¹ØÎĵµ£º

˭˵DelphiûÓйþÏ£

˭˵DelphiûÓйþÏ££¿£­£­DelphiÖУ¬TStringListºÍTHashedStringListµÄÐÔÄܶԱÈ
Ôø¾­¿´µ½ºÜ¶àÈËÔÚÈÂÈÂDelphiûÓйþÏ£±í£¬ÕâЩÈ˵͝ÊÖÒâʶ¹ÃÇÒ²»ÂÛ£¬È´»¹ÓкܶàÈËÒÔ´ËÀ´Ö¤Ã÷Delphi±È±ðµÄÓïÑÔÀ¬»ø£¬ÊµÔÚÊÇ...
ºÃ£¬ÀÎɧ´òס£¬×ª½ÓÕýÌâ¡£
TStringListÊÇÎÒÃdz£ÓõÄ×Ö·û´®ÁбíÀàÐÍ£¬Ó÷¨¾Í²»ÔÚÕâÀï׸Êö£¬µ«ÊÇ£¬ÔÚÊý¾ÝÆäÏîÊýÔö ......

Delphi~~

   ×î½üÒª×öÒ»¸öͼÊé¹ÜÀíϵͳ£¬²¢ÇÒÊÇÓÃDelphiÈí¼þ¿ª·¢£¬ºÜ¶à¶¼²»¶®£¬±¾À´ÊÇ¿ÉÒÔ´ÓÍøÉÏÏÂÔØ£¬Ñ§Ï°Ò»Ïµģ¬¿ÉÊDz»ÖªµÀÔõÃ´ÆÆ½âµÇ½ÃÜÂ룬ÔËÐÐʱû°ì·¨µÇ½½øÈ¥£¬5555~~ºÃºÃѧϰ£¬ÓиßÊÖÖ¸µã¾ÍºÃÁË…… ......

Delphi±àÒëÖ¸Áî˵Ã÷

¡¶DelphiÏÂÉîÈëWindowsºËÐıà³Ì¡·£¨¸½Â¼A Delphi±àÒëÖ¸Áî˵Ã÷£©
Õª³­ÈË£ºÂé×Ó qq:71892967
Delphi¿ìËÙ¸ßСµÄ±àÒëÆ÷Ö÷ÒªÀ´×ÔObject PASCALµÄÑϽ÷£¬Ê¹ÓÃDelphiËæÊ±¶¼ÔÚÓë±àÒëÆ÷½»Á÷£¬´ó²¿·ÖÇé¿öϲ»ÐèÒª¸ÉÉæ±àÒëÆ÷µÄÔËÐУ¬µ«ÊÇÓÐʱҲÐèÒª¶Ô±àÒëÆ÷½øÐбØÒªµÄÉèÖá£
*************************************************** ......

Delphi PureAPIWindow program

program PureAPIWindow;
uses
SysUtils,
Windows,
Messages;
const
WinClassName = 'DvsClass';
StrOut = 'Davis TextOut';
//´°¿Ú»Øµ÷º¯Êý
function MyWinProc(
hWindow: HWND;
aMessage: UINT;
WParam: WPARAM;
LParam: LPARAM): LRESULT; stdcall; export; ......

Delete Delphi temporary file

Rem Delete Delphi temporary file
Rem ****************************
@echo Delete Delphi temporary file
@dir/w/s *.~*
@echo ÒÔÉÏΪµ±Ç°Ä¿Â¼¼°×ÓĿ¼ÁÙʱÎļþ,Çë°´ÈÎÒâ¼üÈ·ÈÏɾ³ý!
@pause
@for /r . %%a in (.) do @if exist "%%a\*.~*" del "%%a\*.~*"
@echo ɾ³ý³É¹¦!
@pause
Rem ************************* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ