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

delphi TStringList Ó÷¨Ïê½â

delphi TStringList Ó÷¨Ïê½â
//TStringList ³£Ó÷½·¨ÓëÊôÐÔ
:
var
  List: TStringList;
  i: Integer;
begin
  List := TStringList.Create;
  List.Add('Strings1');           {Ìí¼Ó}
  List.Add('Strings2');
  List.Exchange(0,1);             {Öû»}
  List.Insert(0,'Strings3');      {²åÈë}
  i := List.IndexOf('Strings1');  {µÚÒ»´Î³öÏÖµÄλÖÃ}
  List.Sort;                      {ÅÅÐò}
  List.Sorted := True;   {Ö¸¶¨ÅÅÐò}
  List.Count;                     {×ÜÊý}
  List.Text;                      {Îı¾¼¯ºÏ}
  List.Delete(0);                 {ɾ³ý, 0ÊǵÚÒ»¸öÊý¾Ý}
  List.LoadfromFile('c:\tmp.txt');{´ò¿ª}
  List.SaveToFile('c:\tmp.txt');  {±£´æ}
  List.Clear;                     {Çå¿Õ}
  List.Free;                      {ÊÍ·Å}
end;
//¶ÁÈë×Ö·û´®
var
  List: TStringList;
begin
  List := TStringList.Create;
  List.CommaText := 'aaa,bbb,ccc,ddd';
//Ï൱ÓÚ: List.Text := 'aaa' + #13#10 + 'bbb' + #13#10' + 'ccc' + '#13#10' + 'ddd';
  ShowMessage(IntToStr(List.Count)); //4
  ShowMessage(List[0]); //aaa
  List.Free;
end;
//Öû»·Ö¸ô·û
var
  List: TStringList;
begin
  List := TStringList.Create;
  Li


Ïà¹ØÎĵµ£º

delphi ×Ô¶¨ÒåÎļþ

±¾ÎÄ×ªÔØ:http://rabbitfox.blog.sohu.com/29948084.html
             http://delphi.about.com/od/fileio/a/fileof_delphi.htm
Ê×ÏÈÏò×÷Õß±íʾ¸Ðл£¡
¡¶ÀûÓÃDelphiµÄ“File Of
Type”´´½¨²¢¹ÜÀíÊôÓÚÄã×Ô¼ºµÄ“Êý¾Ý¿â”¡·
Ô­×÷Õߣ ......

▼¡øDelphiÃæÏò¶ÔÏó±à³ÌµÄ20Ìõ¹æÔò

▼¡øDelphiÃæÏò¶ÔÏó±à³ÌµÄ20Ìõ¹æÔò(×ªÔØ)
Â¥Ö÷ZyxIp£¨¾øÍûÖÐ...£©2003-09-02 14:28:07 ÔÚ Delphi / VCL×é¼þ¿ª·¢¼°Ó¦Óà ÌáÎÊ
×÷Õß¼ò½é    
  Marco   CantuÊÇÒ»¸öÖªÃûµÄDelphiר¼Ò£¬ËûÔø³ö°æ¹ý¡¶¾«Í¨Delphi¡·ÏµÁдÔÊ飬¡¶Delphi¿ª·¢ÊֲᡷÒÔ¼°µç×ÓÊé¡¶¾«Í¨Pascal¡·(¸Ãµç×ÓÊé¿ÉÔÚÍøÉÏÃâ·Ñ»ñµÃ)¡ ......

delphiÖ¸Õë¼òµ¥ÈëÃÅ

delphiÖ¸Õë¼òµ¥ÈëÃÅ:  
   
  ¿´Ò»¸öÖ¸ÕëÓ÷¨µÄÀý×Ó£º  
  1         var  
  2             X,   Y:   Integer;       //   X   and   Y   ÕûÊýÀàÐÍ  
  3 ......

Delphi¿ØÖÆExcel2000ÐĵÃ

(Ò») ʹÓö¯Ì¬´´½¨µÄ·½·¨
Ê×ÏÈ´´½¨ Excel ¶ÔÏó£¬Ê¹ÓÃComObj:
var ExcelApp: Variant;
ExcelApp := CreateOleObject( 'Excel.Application' );
1) ÏÔʾµ±Ç°´°¿Ú£º
ExcelApp.Visible := True;
2) ¸ü¸Ä Excel ±êÌâÀ¸£º
ExcelApp.Caption := 'Ó¦ÓóÌÐòµ÷Óà Microsoft Excel';
3) Ìí¼Óй¤×÷²¾£º
ExcelApp.WorkBooks.Add ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ