你老兄运气好,我就没有你这么好运了,邮件里有demo<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls, ExtCtrls;<br><br>type<br> TForm1 = class(TForm)<br> pnl1: TPanel;<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> h:HWND;<br>begin<br> WinExec('calc.exe',SW_NORMAL);<br> h:= FindWindow(nil,'计算器');<br> //取windows的handle方法多了,这种方法可以把excel/word放入到Delphi窗体里<br> windows.SetParent(h,pnl1.Handle);<br> SetWindowPos(h, 0, 0, 0, pnl1.Width , pnl1.Height, SWP_NOZORDER);<br>end;<br><br>end.