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

¡¶delphiѧϰ԰µØ¡·Ö® TreeviewʹÓÃÏê½â

TreeViewÓɽڵ㹹³É,½¨Ê÷ͨ¹ý¶ÔTreeView.itemsÊôÐÔ½øÐвÙ×÷¡£ItemsÊÇÒ»¸öTTreeNodes¶ÔÏó,ÕâÊÇÒ»¸öTTreeNode¼¯¡£
Ò»¡¢Õë¶ÔTTreeNodes,Ò²¾ÍÊÇ TreeView.Items,ÓÐÕâЩÊôÐÔ:
1¡¢count,½Úµã¸öÊý¡£
2¡¢item[index]  ,ͨ¹ýindexµÃµ½½Úµã¡£
¶þ¡¢Õë¶ÔTTreeNodes,Ò²¾ÍÊÇ TreeView.Items,³£ÓõÄÌí¼Ó½ÚµãµÄ²Ù×÷ÓÐ:
AddFirstÌí¼ÓµÚÒ»¸ö¸ù½Úµã¡£Óɴ˺¯ÊýÌí¼ÓµÄ½Úµã×ÜÅÅÔÚÇ°Ãæ,³ý·ÇºóÀ´ÓÖʹÓô˺¯ÊýÌí¼ÓÁËÒ»¸ö½Úµã,ÔòºóÌí¼ÓµÄ½Úµã½«ÅÅÔÚÇ°Ãæ¡£¸Ãº¯Êý·µ»ØÐÂÌí¼ÓµÄ½Úµã¡£
AddChildFirstÌí¼ÓµÚÒ»¸ö×Ó½Úµã,ÒªÇóÓи¸½Úµã×÷ΪÆä²ÎÊý¡£·µ»ØÐÂÌí¼ÓµÄ½Úµã¡£
AddChildÌí¼ÓÒ»¸ö×Ó½Úµã,ÒªÇóÓи¸½Úµã×÷ΪÆä²ÎÊý¡£·µ»ØÐÂÌí¼ÓµÄ½Úµã¡£
AddÌí¼ÓÒ»¸öÐֵܽڵã,ÒªÇóÓÐÐֵܽڵã×÷ΪÆä²ÎÊý¡£·µ»ØÐÂÌí¼ÓµÄ½Úµã¡£
Èý¡¢Õë¶ÔTTreeNodes,Ò²¾ÍÊÇ TreeView.Items,³£Óõĵõ½½ÚµãµÄ²Ù×÷ÓÐ:
GetFirstNode() µÃµ½¸ù½Úµã¡£
È»ºóÅäºÏTTreeNode.GetNext(),¾Í¿ÉÒÔ·ÃÎÊËùÓеĽڵ㡣
ËÄ¡¢½¨Ê÷¾ÙÀý:
var
  root_node,cur_node:TTreeNode;
begin
  root_node:=AddFirst(nil,'¸ù½Úµã1');
  cur_node:=addChildfirst(root_node,nil,'¸ù½Úµã1_child1');
  add(cur_node,'¸ù½Úµã1_child2');
  root_node:=Add(nil,'¸ù½Úµã2');
  AddChildFirst(root_node,''¸ù½Úµã2_child1');  
end;
 
Î塢ʼþ´¥·¢:
µ±´ÓÒ»¸ö½ÚµãÌøµ½ÁíÒ»¸ö½Úµã,»á´¥·¢TTreeView.OnChangeʼþ¡£¸ÃʼþÖÐ,½«´«µÝnode,¼´µ±Ç°±»Ñ¡ÖеĽڵ㡣
µ±ÐÞ¸ÄÒ»¸ö½ÚµãµÄtextʱ,»á´¥·¢TTreeView.onEditʼþ¡£
Áù¡¢½«½ÚµãºÍ½ÚµãËù¶ÔÓ¦µÄÊý¾ÝÁªÏµÆðÀ´
¶ÔÓÚÿ¸öTTreeNode,ÓиöDataÊôÐÔ,¿ÉÒÔ´æ·ÅÒ»¸öÖ¸Õë¡£ÎÒÃÇ¿ÉÒÔÀûÓÃÕâ¸öÓòÀ´´æ·ÅÓë½Úµã¶ÔÓ¦µÄ×Ô¼ºµÄÊý¾Ý¡£
1.ÎÒÃÇÏȶ¨ÒåÒ»¸öÊý¾Ý½á¹¹,×÷Ϊ¼Ç¼ÎÒÃÇÒª¼Ç¼µÄÊý¾Ý¡£Èç:
type 
  PMyData=^TMyData;
  TMyData=Record
    sFName:string;
    sLName:String;
    nIndex:integer;
  end;
2.È»ºó,´´½¨Êýʱ,½«½ÚµãºÍ½ÚµãÊý¾ÝÁªÏµÆðÀ´:
procedure TForm1.Button1Click(Sender: TObject);
var
  myshuju: PMyData
  cur_node:TTreeNode;
begin
  New(MyRecPtr);  //¼Çס,Ò»¶¨ÒªÏÈ·ÖÅäÄÚ´æ¡£Óм¸¸ö½Úµã,¾Í


Ïà¹ØÎĵµ£º

DelphiµÚÈý·½¿Ø¼þ°²×°Ð¶ÔØÖ¸ÄÏ


DelphiµÚÈý·½¿Ø¼þ°²×°Ð¶ÔØÖ¸ÄÏ
 
»ù±¾°²×°
1¡¢¶ÔÓÚµ¥¸ö¿Ø¼þ£¬Componet-->install component..-->PAS»òDCUÎļþ-->install;
2¡¢¶ÔÓÚ´ø*.dpkÎļþµÄ¿Ø¼þ°ü£¬File-->Open(ÏÂÀ­Áбí¿òÖÐÑ¡*.dpk)-->install¼´¿É£»
3¡¢¶ÔÓÚ´ø*.bplÎļþµÄ¿Ø¼þ°ü£¬Install Packages-->Add-->bplÎļþÃû¼´¿É£»
4¡¢Èç¹ ......

¹ØÓÚ Delphi ÖÐÁ÷µÄʹÓÃ:·Ö¸îÓëºÏ²¢ÎļþµÄº¯Êý

unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class
(TForm)
Button1: TButton;
Button2: TButton;
procedure
Button1Click(Sender: TObject);
procedure
Button2Click(Sender: TObj ......

ÔÚDelphiÖÐÆ´×°SQLÓï¾äµÄ×¢Òâµã

ÎÒʹÓÃdelphiÒ²²»ÊǺܳ¤Ê±¼ä£¬ÓÉÓÚ¾­³£ÒªÓõ½SQLÓï¾ä£¬×ܽáÁËһЩDelphiÖÐʹÓÃSQLÓï¾äҪעÒâµÄÊÂÏ¹éÄÉÆðÀ´Ö÷ÒªÓÐһϼ¸Ìõ£º
Ò»¡¢¿Õ¸ñ²»ÒªÂ©£º
ÎÒÃǾ­³£ÒªÆ´×°SQLÓï¾ä£¬ÌرðÊÇwhereÌõ¼þ¾ä£¬ÔÚ¸÷¸öÓï¾äÖбðÍüÁËͷβ¼ÓÉÏ¿Õ¸ñ¡£ÒòΪÔÚÒ»¸öÓï¾äÖÐÎÒÃÇ»á×¢ÒâÓÿոñ·Ö¿ª¹Ø¼ü×Öµ«ÊÇÍùÍùÍüÁËͷβµÄ¿Õ¸ñ¡£ÀýÈ磺
sSQL=' select ......

ÓÃDelphi¿ª·¢JNI(Java+Native+Interface)Ó¦ÓÃ

JNI(Java+Native+Interface£¬Java±¾µØ½Ó¿Ú)¼¼Êõ´ó¼Ò¶¼²»Ä°Éú£¬Ëü¿ÉÒÔ°ïÖú½â¾öJava·ÃÎʵײãÓ²¼þµÄ¾ÖÏÞºÍÖ´ÐÐЧÂʵÄÌá¸ß¡£¹ØÓÚJNIµÄ¿ª·¢£¬´ó¶àÊý×ÊÁÏÌÖÂ۵Ķ¼ÊÇÈçºÎÓÃC/C++ÓïÑÔ¿ª·¢JNI£¬ÉõÖÁÓÚJDKÒ²ÌṩÁËÒ»¸öjavah¹¤¾ßÀ´×Ô¶¯Éú³ÉCÓïÑÔ³ÌÐò¿ò¼Ü¡£µ«ÊÇ£¬¶ÔÓÚ¹ã´óµÄDelphi³ÌÐòÔ±À´Ëµ£¬ÄѵÀ¾Í²»ÄÜÓÃ×Ô¼ºÏ²°®µÄDelphiÓëJava»¥Í¨Ïû ......

DelphiÖÐʹÓÃDirectX½ØÆÁº¯Êý


ת×Ô£ºhttp://www.52delphi.com/List.asp?ID=597&Page=1
¡¡¡¡ºËÐÄÌáʾ£ºº¯ÊýÐèÒª uses Direct3D9,D3DX9; żȻ·¢ÏÖÒ»¸öº¯Êý¿ÉÒÔÖ±½Ó±£´æ±íÃæµ½Îļþ1£¡ËùÒÔÐÞ¸ÄÁËһϣ¬º¯ÊýΪ£º...
procedure CaptureScreen(Const FileName: string);
var
BitsPerPixel: Byte;
pD3D: IDirect3D9;
pSurface: IDirect3DSurface9;
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ