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ͼÏñ´¦Àí -- Êý¾ÝÀàÐͼ°ÄÚ²¿¹ý³Ì¡·Ò»ÎÄÖж¨ÒåÁË»ù±¾µÄͼÏñÊý¾ÝÀàÐͼ°Ò»Ð©ÄÚ²¿¹ý³Ì£¬±¾ÎĽøÒ»²½½«Delphi³£ÓõÄͼÏñÀàÐÍת»»ÎªÍ¼Ïñ´¦ÀíËùÐèµÄÊý¾Ý½á¹¹£¬Îª¾ßÌåµÄDelphiͼÏñ´¦Àí¹ý³Ì×÷×¼±¸£¬Í¬Ê±Ò²Òª½«´¦ÀíºÃµÄͼÏñÊý¾Ýת»»ÎªDelphiµÄ³£ÓÃͼÏñÀàÐÍ¡£¡¶DelphiͼÏñ´¦Àí¡·ÏµÁгýͼÏñÊý¾Ýת»»¹ý³ÌÍâ£¬Æ ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw, ExtCtrls,MSHTML;
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Edit1: TEdit;
&nb ......
WebBrowser×é¼þºÍMSHTML ÔÚDelphiÖеÄʹÓÃ
ÓÉÓÚÏîÄ¿ÐèÒª£¬½üÀ´Ñо¿ÁËÒ»ÏÂWebBrowser×é¼þºÍMSHTML ÔÚDelphiÖеÄʹÓÃ,ÕûÀíÁËÒ»ÏÂÕâ¶Îʱ¼äÑо¿µÄ½á¹û,дÏÂÀ´Ò»ÊÇ·½±ã´ó¼Ò²éÔÄ,¶þÒ²¿ÉÒÔ¼ÓÉîÎÒ×Ô¼ºµÄ¼ÇÒä.Ï£ÍûÄܶԴó¼ÒÓÐËù°ïÖú… …,ͬʱ,Èç¹ûÓиüºÃµÄ´¦Àí·½Ê½»òÕßÎÒûÓÐÌáµ½µÄÎÊÌâ,Çë´ó¼ÒÒ²¸æËßÎÒŶ, ÔÛÃÇÒ» ......
°æÈ¨ÉùÃ÷£ºÔ´´×÷Æ·£¬ÔÊÐí×ªÔØ£¬×ªÔØÊ±ÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ Ôʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://bigpower.blog.51cto.com/209892/90287
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCt ......