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
Ïà¹ØÎĵµ£º
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 ......
·½·¨Ò»£º
¿Ø¼þÀà½Ð×ö TABC,ÎļþÃû½Ð abc.pas ÄÇôн¨Á¢Ò»¸öÎļþ½Ð
abc.rc
ÀïÃæÄÚÈÝÊÇ
TABC Bitmap icon.bmp
icon.bmp ¾ÍÊÇͼƬÎļþÃû£¬²»Òª³¬¹ý256É«£¬24x24
È»ºóÔÚÃüÁîÐÐÏÂÖ´ÐÐ brcc32 abc.rc¾Í»áÉú³É abc.res
¸ÄÃûΪ abc.dcr
´ò¿ªÄã¿Ø¼þµÄ dpkÎļþ£¬ ¼ÓÉÏ {$R ABC.DCR}
ÖØÐ±àÒë¾Í¿ÉÒÔÁË¡£
±ã½Ý·½ ......
н¨Ò»¸öActive Library
2. н¨Ò»¸öCOM Object£¬ÔÚClass NameÌîÒ»¸öÃû×Ö£¬ÈçTest¡£
µãÒ»ÏÂImplemented InterfaceºóÃæµÄList°´Å¥¡£ÔÙµãһ϶Ի°¿òÖеÄAdd Library°´Å¥£¬
Ñ¡Ôñ“Program Files\Common Files\Designer”Ŀ¼ÏµÄmsaddndr.dllÎļþ¡£
È»ºóÔÚÁбíÖÐÕÒµ½msaddndr.dllÀïÃæµÄ_IDTExtensibility2½Ó¿Úµã ......
DelphiµÄTCanvasÒÔ¼°ÅÉÉúÀàÌṩÁËÏÔʾTGraphicͼÏñµÄ·½·¨Draw£¬ÆäʵÕâ¸ö·½·¨±¾Éí²¢Ã»ÓÐÏÔʾͼÏñµÄ¹¦ÄÜ£¬Ö»ÊÇ·´¹ýÀ´µ÷ÓÃÁËÒ»ÏÂTGraphicµÄDraw·½·¨¡£TGraphic±¾ÉíÊǸö³éÏóÀ࣬ÆäDraw·½·¨Ò²ÊǸö´¿Ðé·½·¨£¬ËùÒÔTGraphicµÄËùÓÐÅÉÉúÀà±ØÐëÌṩһ¸ö¾ßÌåµÄDraw·½·¨¡£TGraphicµÄÖ÷ÒªÅÉÉúÀàTBitmapÒ²ÓÐÒ»¸öDraw·½· ......
ͼÏñÐýת£¬ÊÇÖ¸°´ÕÕ¸ø¶¨µÄ½Ç¶È£¬¼ÆËã³öͼÏñÿ¸öÏñËØ×ø±êµãÔÚÐÂͼÏñÉϵÄ×ø±êλÖ㬴ӶøÊµÏÖÕû¸öͼÏñ×ø±ê±ä»»µÄͼÏñ´¦ÀíÊֶΡ£ÆäÏñËØ×ø±êµÄ±ä»»¹«Ê½Îª£º
(1)¡¢x' = x * cos(angle) + y * sin(andle)
y' = ......