Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±àÂë¹æ·¶Îĵµ

delphi±àÂë¹æ·¶Îĵµ
Ŀ¼
1¡¢Ç°ÑÔ 3
2¡¢Ô´³ÌÐòÊéд¹æ·¶ 3
2.1ͨÓÃÔ´´úÂë¸ñʽ¹æ·¶ 3
2.1.1Ëõ½ø 3
2.1.2±ß¾à 3
2.1.3 Begin…EndÓï¾ä 3
2.1.4×¢ÊÍ 4
2.2 OBJECT PASCALÓï¾ä¸ñʽÊéд¹æ·¶ÓëÓ÷¨ 4
2.2.1À¨ºÅ 4
2.2.2±£Áô×ֺ͹ؼü×Ö 4
2.2.3¹ý³ÌºÍº¯Êý 5
2.2.4±äÁ¿ 5
2.2.5ÀàÐÍ 6
2.2.6Óï¾ä 6
2.2.7½á¹¹» ......

delphi ¿Ø¼þ°²×°


ÓÉÓÚ×é¼þÌṩµÄ·½Ê½²»Í¬£¬ËùÒÔ°²×°µÄ·½·¨Ò²ÊDz»Ò»ÑùµÄ£¬ÏÂÃæ¾ÍĿǰ³£¼ûµÄ¸÷ÖÖÐÎʽµÄ×é¼þµÄ°²×°·½·¨½éÉÜһϡ£
1¡¢Ö»ÓÐÒ»¸ödcuÎļþµÄ×é¼þ¡£dcuÎļþÊDZàÒëºÃµÄµ¥ÔªÎļþ£¬ÕâÑùµÄ×é¼þÊÇ×÷Õß²»Ïë°ÑÔ´Â빫²¼¡£Ò»°ãÀ´Ëµ£¬×÷Õß±ØÐë˵Ã÷´Ë×é¼þÊʺÏdelphiµÄÄÄÖÖ°æ±¾£¬Èç¹û°æ±¾²»¶Ô£¬ÔÚ°²×°Ê±¾Í»á³öÏÖ´íÎó¡£Ò²ÕýÊÇÒòΪûÓÐÔ´Â룬¸øÊ ......

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ºÅ