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

DelphiÖпؼþµÄ¶¯Ì¬´´½¨

 ÍøÉÏËѼ¯×ÊÁÏ ²Î¿¼Ð´µÄ´úÂë ʵÏֿؼþµÄ¶¯Ì¬´´½¨ ÍêÕû´úÂëÈçÏ£º
 (ʵÏÖ½çÃæ)
-------------------
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ComCtrls;
type
  TControlClass =class of TControl ;
  TForm1 = class(TForm)
    RadioGroup1: TRadioGroup;
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
uses unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
  ControlClassArry: array[0..2]of
         TControlClass= (TMonthCalendar,TMemo,TColorBox) ;
var
  i:integer;
  ControlObj:TObject ;
begin
  for i:=0 to controlcount-1 do
  if (Controls[i] is TMonthCalendar) or (controls[i] is TMemo)
     or (Controls[i] is TColorBox) then
  Controls[i].Free ;
  ControlObj:= TControlFactory.create(self,ControlClassArry[RadioGroup1.ItemIndex]);
  Label1.Caption :=ControlObj.ClassName ;
  if (ControlObj is TMemo) then TMemo(ControlObj).Lines.Add('²âÊԳɹ¦£¡');
  if (ControlObj is TColorBox) then TColorBox(ControlObj).ItemIndex :=2;
end;
end.
-------------------
2009-11-04


Ïà¹ØÎĵµ£º

֪ʶС½á(Delphi)

1) Error loading midas.dll     ûÓÐ×¢²ámidas.dll ÔËÐÐRegSver32.exe midas.dll
2)Result := GetProcAddress(FGDIPlusLibrary, PChar(ProcName));±àÒë ³öÏÖÕâÑùµÄÎÊÌ⣬Ӧ¸ÃÊÇÉèÖ÷½ÃæµÄÎÊÌ⣬Project->Options->Complier->Hugestrings ¹³ÉϾÍokÁË£¡
3) TCheckListBoxÓиöitemEnable ......

DelphiͼÏñ´¦Àí

±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/maozefa/archive/2009/10/28/4737584.aspx
ͼÏñËõ·ÅÊÇ×î³£ÓõÄͼÏñ´¦Àí£¬ÔÚͼÏñÀ­ÉìºÍÈ¡µÃͼÏñÂÔͼÖж¼ÒªÓõ½¡£Í¼ÏñËõ·ÅÖÊÁ¿µÄºÃ»µÓëͼÏñÏñËØ²åÖµ·½Ê½Óйأ¬±¾Î͍ÒåÁ˳£ÓõÄ3ÖÖ²åÖµ·½Ê½£¬¼´ÁÙ½ü²åÖµ¡¢ÏßÐÔ²åÖµºÍË«Á¢·½²åÖµ·½Ê½£º
view plaincopy to clipboardpr ......

delphi TListViewµÄʹÓÃ


ListView1.Items Ϊ±ê×¼ TlistitemsÀà
ListView1.Items
(1)¸³Öµ
with ListView1.Items.Add do
begin
Caption:=caption; //Ìí¼ÓµÚÒ»Ïî
SubItems.add(aaaaa); //Ìí¼ÓºóÃæÊý¾Ý
SubItems.add(1234);
SubItems.add(1234);
end; //Ò»¶¨ÒªÊ¹ÓÃWITH½á¹¹.
(2)ȡֵ
listview1.Items.Item[i].Caption È¡µÃijÌõÊý¾Ý±êÌâ
l ......

delphi È«¾Ö±äÁ¿µÄ¶¨ÒåÓë³õʼ»¯¸³Öµ

 delphiÈ«¾Ö±äÁ¿µÄ¶¨ÒåÓ븳ֵÖ÷ÒªÓÐÏÂÃæ¼¸ÖÖ·½·¨£º
1.
È«¾Ö±äÁ¿µÄ³õʼ»¯
ÔÚ×îºó½áÊøµÄend.֮ǰ,Ôö¼Óinitialization¹Ø¼ü×Ö,È»ºó¼ÓÈë¶ÔÈ«¾Ö±äÁ¿µÄ³õʼ»¯,ÕâÑù¾Í¿ÉÒÔ³õʼ»¯È«¾Ö±äÁ¿ÁË.²»ÂÛÔÚinterface»¹ÊÇÔÚimplementation²¿·ÖµÄÈ«²¿±äÁ¿,¶¼¿ÉÒÔÕâôÀ´³õʼ»¯
//Ê¡ÂÔÇ°ÃæµÄinterface, uses, type.
var
i: Integer; ......

DelphiͼÏñ´¦Àí

    CSDNÂÛ̳ÖУ¬¾­³£¿´µ½ÓÐ¹Ø½ØÆÁµÄÌù¡£Ëùν½ØÆÁ£¬Ö¸µÄÊÇ»ñÈ¡ÆÁÄ»£¬»òÕ߯ÁÄ»ÉÏij¸ö´°¿ÚÉϵÄÐÅÏ¢£¬²¢½«Æäת»»ÎªÍ¼ÏñµÄ²Ù×÷¡£Îª´Ë£¬Ò²Ð´Á˼¸¸öWindowsÏµē½ØÆÁ”º¯Êý£º
¹ý³Ì¶¨Ò壺
// »ñÈ¡CanvasÓÐÐ§ÇøÓòÄÚµÄͼÏñÊý¾Ý¡£±ØÐëÓÃFreeImageDataÊÍ·ÅÊý¾Ý½á¹¹
// Ó¦µ÷ÓÃImageEmpty¼ì²é·µ»ØÊý¾Ý½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ