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

½«WordǶÈëDelphiÖÐ

°æÈ¨ÉùÃ÷£ºÔ­´´×÷Æ·£¬ÔÊÐí×ªÔØ£¬×ªÔØÊ±ÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ ԭʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://bigpower.blog.51cto.com/209892/90287
unit Main;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls,Comobj;
type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    procedure Panel1Resize(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    FComApp:OleVariant;
    gWaveHwnd:Hwnd;
  public
    { Public declarations }
    procedure SetParentWindow(pParent: TWinControl);
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
  Word : Variant;
begin
  FComApp := CreateOLEObject('Word.Application');
  FComApp.Documents.Open(extractfilepath(Application.ExeName)+'\test.doc',false);
  FComApp.Visible := True;
  Label1.Caption := FComApp.ActiveWindow.Caption;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
  SetParentWindow(Panel1);
end;
procedure TForm1.Panel1Resize(Sender: TObject);
begin
  if gWaveHwnd<>0 then
  begin
    FComApp.ActiveWindow.Height := Panel1.Height;
    FComApp.ActiveWindow.Width := Panel1.Width;
    Windows.MoveWindow(gWaveHwnd,0,0,Panel1.Width,Panel1.Height,false);
  end;
end;
procedure TForm1.SetParentWindow(pParent: TWinControl);
var
  lWaveHwnd : Hwnd;
  lWidth, lHeight: Integer;
  lWindowCap


Ïà¹ØÎĵµ£º

Delphi ÍêȫʱÉÐÊÖ²áÖ® Visual Style ƪ

    ÕâÀïÏÈ˵˵Á½¸ö¸ÅÄTheme(Ö÷Ìâ)ºÍ Visual Style ¡£Theme ×îÔç³öÏÖÔÚ Microsoft Plus! for Windows 95 ÖУ¬ÊÇ Windows ÖÐ Wallpaper¡¢Cursors¡¢Fonts¡¢Sounds ¡¢Icons µÈµÄÉèÖÃÖµ¼¯ºÏ¡£Visual Style ÔÚ Windows XP Öвű»ÒýÈ룬Visual Style ¹æ¶¨ÁË Contorls µÄÍâ¹Û£¬ÁíÍ⻹°üÀ¨Ê¹ÓÃÕâЩÍâ¹ÛµÄÒ»Ì× API ......

delphi»ñÈ¡WindowsϵͳµÄ½ø³ÌÔËÐÐÐÅÏ¢

 delphi»ñÈ¡WindowsϵͳµÄ½ø³ÌÔËÐÐÐÅÏ¢
×Ô´Ó³öÏÖwindowsϵͳÒÔÀ´£¬¸÷ÖÖ¸÷ÑùµÄÈí¼þ²ã³ö²»Çî¡£¹ºÂò»òÕßÃâ·ÑÏÂÔØÒÔºó£¬ÇáÇáµã»÷Install»òÕßSetupÒÔºó£¬ÉÔ×÷ЩÐí¼òµ¥ÅäÖþÍÍê³É°²×°µÄÕû¸ö¹ý³Ì¡£ÏÔÈ»Õâ¸øÓû§´øÀ´ÁËÐí¶à·½±ã£¬µ«¶ÔÓû§À´ËµÕâЩÈí¼þËÆºõÊǸö"ºÚÏ»×Ó"£¬Õ¹ÏÖÔÚÓû§ÃæÇ°µÄ½ö½öÊÇ»ªÀöµÄÍâ±íºÍ¼ò½àµÄ²Ù×÷£¬ÖÁÓÚÈí ......

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

DelphiͼÏñ´¦Àí

    DelphiµÄTCanvasÒÔ¼°ÅÉÉúÀàÌṩÁËÏÔʾTGraphicͼÏñµÄ·½·¨Draw£¬ÆäʵÕâ¸ö·½·¨±¾Éí²¢Ã»ÓÐÏÔʾͼÏñµÄ¹¦ÄÜ£¬Ö»ÊÇ·´¹ýÀ´µ÷ÓÃÁËÒ»ÏÂTGraphicµÄDraw·½·¨¡£TGraphic±¾ÉíÊǸö³éÏóÀ࣬ÆäDraw·½·¨Ò²ÊǸö´¿Ðé·½·¨£¬ËùÒÔTGraphicµÄËùÓÐÅÉÉúÀà±ØÐëÌṩһ¸ö¾ßÌåµÄDraw·½·¨¡£TGraphicµÄÖ÷ÒªÅÉÉúÀàTBitmapÒ²ÓÐÒ»¸öDraw·½· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ