Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 KOL Ìåϵ

Ò»¡¢KOLÊÇʲô?KOLÄÜ×öʲô? MCKÊÇʲô?MCKÄÜ×öʲô?
KOLÊÇÒ»Ì×¶ÔÏó¿â£¬Ãâ·Ñ¶øÇÒ¿ª·ÅÔ´´úÂ룬´ó¼Ò¿ÉÒÔhttp://www.kolmck.net/È¥ÏÂÔØµ½
Ëü¡£ËüÄܹ»Ê¹Delphi±à³ö³ß´ç·Ç³£Ð¡µÄ32λWindowsͼÐÎÓû§½çÃæµÄÓ¦ÓóÌÐò¡£
Ŀǰ֧³ÖµÄDelphi°æ:Delphi6,Delphi5,Delphi4,Delphi3ºÍDelphi2¡£
ʹÓÃKOLÔÚD2-D5ÖбàдµÄ×îСͼÐνçÃæ³ÌÐò ......

֪ʶС½á(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ÖÐWEBBrowserÍøÒ³JSº¯Êýµ÷ÓÃdelphiº¯Êý

1.1¡¢¼¤»î
var doc,url:Olevariant ;
begin
url:='about:blank' ;//»òÕßÒ»¸öÓÐʵ¼ÊÒâÒåµÄurl
WebBrowser1.Navigate2(url);//ÕâÑù¾Í¼¤»îÁË£¡
end;
1.2¡¢Ð´HTML´úÂë
var doc:Olevariant ;
s:string;
begin
doc:=WebBrowser1.Document;
doc.clear;//Çå³þÔµÓÉÄÚÈÝ£¬ÒÔ±ãдÐÂÄÚÈÝ
doc.write('<html>');
//ÆäË ......

delphi Ïòwebbrowser´ò¿ªµÄÍøÒ³ÖвåÈëjsÃüÁî

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 ......

ÓÃdelphi°ÉÒ»¸öwordÎĵµ×·¼Óµ½ÁíÍâÒ»¸öwordÎĵµÖÐ

uses ComObj;
var WordApp: Variant;
begin
WordApp := CreateOleObject('Word.Application');
WordApp.Documents.open('c:\1.doc');
WordApp.Selection.InsertFile('c:\2.doc','',False,false,false);
WordApp.Selection.InsertFile('c:\3.doc','',False,false,false);
WordApp.ActiveDocument.SaveAs('C:\4.doc' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ