uses shellapi; ... procedure TForm1.Button2Click(Sender: TObject); var vh: HWND; begin ShellExecute(Self.Handle,'open',Pchar(filename),'',nil,SW_SHOWNORMAL); vh := Windows.FindWindow(nil, '窗口标题串'); if vh<>0 then begin Windows.SetParent(vh, Self.Panel1.Handle); Windows.MoveWindow(vh, 0, 0,Self.Panel1.Width,Self.Panel1.Height,True); end else ShowMessage('xx程序未运行!'); end;