1¡¢DelphiÕýÔò±í´ïʽѧϰ
DelphiÕýÔò±í´ïʽѧϰ£¬²Î¿¼CSDNÍòÒ»ÀÏʦµÄBLOG¡¢CSDN¡¢ÍøÂç×ÊÁÏÒÔ¼°´øÔ´ÂëµÄTPerlRegEx£¬ÔÚ´Ë×¢Ã÷£¬ÒÔºó²»ÔÙ˵Ã÷£¬ÔÚЩ¸ÐлGoogleÀÏʦºÍ°Ù¶ÈÀÏʦ
°²×°£º
ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/1668436
1¡¢°²×°.dpkÎļþ£¬ÔÚLibaryÖÐÌí¼ÓTPerlRegExµ¥Ôª´æ·Å·¾¶
2¡¢ÔËÐгÌÐòÇ°¸´ÖÆpcrelib.dllµ½C:\WINDOWSÏÂ
СÊÔ£º
procedure TForm1.FormCreate(Sender: TObject);
var
reg: TPerlRegEx; //ÉùÃ÷ÕýÔò±í´ïʽ±äÁ¿
begin
reg := TPerlRegEx.Create(nil); //½¨Á¢
reg.Subject := 'GoodBoy is You!'; //ÕâÊÇÒªÌæ»»µÄÔ´×Ö·û´®
reg.RegEx := 'You'; //ÕâÊDZí´ïʽ, ÔÚÕâÀïÊÇ×¼±¸Ìæ»»µôµÄ×Ó´®
reg.Replacement := 'Me'; //ÒªÌæ»»³ÉµÄд®
reg.ReplaceAll; //Ö´ÐÐÈ«²¿Ìæ»»
ShowMessage(reg.Subject); //·µ»ØÌæ»»½á¹û: GoodBoy is Me
FreeAndNil(reg); //»ò reg.Free
end;
//License Version 1.1
//Delphi 7.0
procedure TForm1.btn1Click(Sender: TObject);
var
Reg : TPerlRegEx;
begin
Reg := TPerlRegEx.Create(nil);
with Reg do
begin
Subject := 'ÎÒ°®DELPHI, µ«Delphi²»°®ÎÒ--Delphi!'; //Ä¿±ê×Ö·û´®
RegEx := 'Delphi'; //ÒªÌæ»»µÄ×Ö·û´®
Replacement := 'Ëü'; //Ìæ»»ºóµÄ×Ö·û´®
Options := [preCaseLess]; //²»Çø·Ö´óСд
ReplaceAll; //È«²¿Ìæ»»
ShowMessage(Subject);
FreeAndNil(Reg);
end;
//ÉèÖÃOptions := [preCaseLess];ÖÐÎÄÒ²¿ÉÒÔÌæ»»
end;
Ïà¹ØÎĵµ£º
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 ......
Client:TSocketConnection ºÍServer: Scktsrvr¹Øϵ----ѹËõÊý¾Ý´«Êä
Ò»Ö±ÓÃSocketConnectionºÍ·þÎñ¶ËµÄ´«ÊäÊý¾ÝÔÚÈý²ãÊý¾Ý¿âÖУ¬´ÓÀ´Ã»ÓÐ×¢Òâµ½ËüÃÇÖ®¼äµÄÊý¾Ý´«Ê䣬ֻÊÇÏë×Å£¬¹ÜËüÁË£¬ÍøÂçµÄÊ£¬Ç°¶Îʱ¼äÔÚDelphiÖеÄDemosÖз¢ÏÖDemos\Midas\Intrcpt.dprÀý×Ó£¬ºÇºÇ£¬ÔÙ¿´ÁË°ëÌìµÄVCL·¢ÏÖ¿ÉÒÔ½«Client¶Ë·¢Ë͵ĸøServerµÄÊ ......
// ÅжÏÊÇ·ñÊÇÊýÖµÐÍ By yangxiao 2007.7.21
function isNumeric(strText: WideString): Boolean;
var
s: string;
i, l, p: Integer;
begin
Result := False;
l := Length(strText);
if l = 0 then Exit;
s := '';
for i:=1 to l do
......
¿ª·¢²½Ö裺
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
2¡¢´´½¨COM Object¡£
3¡¢´´½¨Type Library£¬²¢´´½¨ÏàÓ¦½Ó¿Ú¡£
4¡¢´´½¨½Ó¿Ú¶ÔÓ¦µÄº¯ÊýºÍʵÏÖ¡£
¾ßÌåÈçÏ£º
1¡¢´´½¨COM Object¡£
new|other|activeX|com object
ÔÚClass Name(±¾ÀýÀïÀàÃûÀïÌîObject£¬¿É°´×Ô¼ºÐèÒªÌîд) ÌîдÀàÃû.(Instancing:ʵÀý´´½¨·½Ê½,Threading Model:Ï ......
DelphiÖе÷ÓÃWindows×Ô´øµÄͼƬºÍ´«Õæä¯ÀÀÆ÷²é¿´Í¼Æ¬£¬¿ÉÒÔÐýתͼƬҲ¿ÉÒÔµ÷Óûͼ³ÌÐò±à¼Í¼Ïñ¡£×Ô¼ºÐ´²»³öÀ´ºÃµÄ´úÂ룬¾ÍÓÃϵͳ×Ô´øµÄºÃÁË¡£
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,ShellAPI;
type
TForm1 = class(TFo ......