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

DelphiÖÐÎļþ¿½±´·½·¨¼¯ºÏ

Ò»¡¢Ê¹ÓÃÎļþÁ÷µÄ·½·¨½øÐп½±´£¬µ±È»¡£Í¬ÑùµÄµÀÀí£¬ÄãÒ²¿ÉÒÔʹÓÃÄÚ´æÁ÷µÈ·½·¨½øÐÐÎļþµÄ¿½±´£¬Ô­ÀíÊÇÒ»ÑùµÄ¡£
procedure copyfile(sourcefilename,targetfilename : String);
var f1, f2: tfilestream;
begin
 f1 := tfilestream.Create(sourcefilename, fmopenread);
 try
   f2 := tfilestream.Create(targetfilename, fmopenwrite or fmcreate);
   try
     f2.Copyfrom(f1, f1.Size);
   finally
     f2.Free;
   end;
 finally
   f1.Free;
 end;
end;
¶þ¡¢Ê¹ÓÃBLOCKREADºÍBLOACKWRITEµÄ·½·¨½øÐÐÎļþµÄ¿½±´¡£
Procedure FileCopy(const fromfile, Tofile: string);
var
 F1, F2: file;
 NumRead, Numwritten: integer;
 Buf: array[1..2048] of char;
begin
 AssignFile(F1, fromfile);
 reset(F1, 1);
 AssignFile(F2, Tofile);
 Rewrite(F2, 1);
 repeat
   BlockRead(F1, Buf, sizeof(Buf), NumRead);
   BlockWrite(F2, Buf, NumRead, Numwritten);
 until (NumRead = 0) or (Numwritten <> NumRead);
 closefile(F1);
 closefile(F2);
end;
Èý¡¢Ê¹ÓÃAPIÎļþ½øÐÐÎļþµÄ¸´ÖÆ
procedure CopyFile(fromFileName, ToFileName: string);
var
 f1, f2: file;
begin
 AssignFile(f1, fromFileName);
 AssignFile(f2, ToFileName);
 reset(f1);
 try
   Rewrite(f2);
   try
     if Lzcopy(TfileRec(f1).handle, TfileRec(f2).handle) < 0
       then
       raise EinoutError.Create('Îļþ¸´ÖÆ´íÎó');
   finally
     closefile(f1);
   end;
 finally
   closefile(f2);
 end;
end;
ËÄ¡¢Windows APIº¯Êý ʵÏÖÎļþµÄ¿½±´
function CopyFile(lpExistingFileName, lpNewFileName: PChar; bFailIfExists: BOOL): BOOL; stdcall;
²ÎÊý˵Ã÷£º
lpExistingFileName    £º    Ô­ÎļþÃû³Æ£»
lpNewFileName        £º  Ä¿±êÎļþÃû³Æ
bFailIfExists       &nbs


Ïà¹ØÎĵµ£º

DelphiÖ÷´Ó±íÀý×Ó

ÔÚsql server µÄnorthwide Öн¨Á¢Ö÷±í
create table sell_h( sell_id char(10),cust_name char(10) Primary key(sell_id) )
go
create table sell_h( sell_id char(10),inv char(10) ,amt float,qty float Primary key(sell_id,inv) )
Ê×ÏÈ,ҪעÒâÒÔÏÂÉèÖÃ
1.ҪעÒⱨ´Ó±íqrydetailÉèÖÃ,Åú±£´æ¿ªÊ½. ¼´.locktype= batc ......

Delphi to Excel һЩ·½·¨

Ò»)   ʹÓö¯Ì¬´´½¨µÄ·½·¨   
  
  Ê×ÏÈ´´½¨   Excel   ¶ÔÏó£¬Ê¹ÓÃComObj: 
  var   ExcelApp:   Variant; 
  ExcelApp   :=   CreateOleObject(   'Excel.Application'  ......

DelphiÔÚVasta/win 7Ï»ñȡȨÏÞ

±Ï¾¹Win32³ÌÐòµÄ¿ª·¢£¬Delphi»¹ÊÇÓÐÍçÇ¿µÄÉúÃüÁ¦µÄ¡£
²Ù×÷²½ÖèÈçÏ£º
1.½¨Á¢ res Îļþ
½¨Á¢Ò»¸öÎı¾Îļþ£¬Ãû×Ö¿ÉÒÔ×Ô¼ºÆð£¬ÎÒÕâÀï½Ð£ºUAC.manifest£¬ÄÚÈÝ£º
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
......

CSDN Ñ°ÕÒ×îºóÒ»¸öDelphiϬÀû¸ç

°Ù¶ÈÖªµÀÕæÀ¬»ø£¬ÄÇô´óµÄÒ»¸öÆóÒµ£¬¾Í¸øÄÇôµã¿Õ¼ä£¬Ìá¸öÎÊ1500×ÖÏÞÖÆÁË¡£ÏëÏëÀ´csdn£¬¹ÒÁËÒ»¸öÐÇÆÚ¶¼Ã»ÈËÀí£¬²»ÖªµÀÊÇÎÒ·ÖÌ«ÉÙ£¬»¹ÊÇÕæµÄ¸ßÊÖ¶¼²»À´ÕâÀ£¿£¿ÆÚ´ýÒ»¸öÓ¢Ð۵ĵ½À´£¬²ËÄñÎÒÔÚÕâÀï°ÝлÁË£¡£¡ÆäʵÕâ¸ù±¾²»ÊÇÉúÃüÄÑÌ⣬ÎҲŸոÕѧ£¬Îʲ»³öÉúÃü¸ßÉîµÄÌâÄ¿À´£º
rT;
delphi7 ,DB:oracle
ÎÊÌâÔËÐй¤³ÌÎļþexe²» ......

WIN32ÏÂDELPHIÖеĶàÏ̡߳¾ÉîÈëVCLÔ´Âë¡¿£¨Ò»£©

Ï̵߳Ļù´¡ÖªÊ¶
      Ï̵߳Ä×é³É¡£Ïß³ÌÓÐÁ½²¿·Ö×é³É¡£
     1¡¢Ò»¸öÊÇÏ̵߳ÄÄں˶ÔÏ󣬲Ù×÷ϵͳÓÃËüÀ´¶ÔÏß³Ìʵʩ¹ÜÀí¡£Äں˶ÔÏóÒ²ÊÇϵͳÓÃÀ´´æ·ÅÏß³Ìͳ¼ÆÐÅÏ¢µÄµØ·½¡£
     2¡¢ÁíÒ»¸öÊÇÏ̶߳ÑÕ»£¬ËüÓÃÓÚά»¤Ïß³ÌÔÚÖ´ÐдúÂëʱÐèÒªµÄËùÓк¯Êý²ÎÊýºÍ¾Ö² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ