由于需求需要用delphi使用olevariant对象的方式编辑powerpoint但是我的代码总是出现打开的ppt程序不能再窗体的左上端显示(最大化之后,进行还原操作,就会出现如下图所示的问题)当最大化的时候就正常显示有做过的吗,能指教一下这是怎么回事吗(我已经在resize事件中控制了ppt的显示位置和大小,最大化的时候管用,还原之后不管用)。 另外,有知道怎么把如下图中宏框中的标题栏隐藏的吗?以下是打开ppt代码:function TForm1.OpenPowerPointFile(FileName:string;IsEdit:Boolean):Boolean;
var
i:Integer; sCaption:string;
begin
PptApp.visible := true;
sCaption := PptApp.caption;
PptApp.width := width-width*0.254;
PptApp.height:= height;
PptApp.left := 0; PptApp.top := 0;
Winapi.Windows.SetParent(FindWindow(nil,Pchar(sCaption)),self.handle);
PptApp.Presentations.Open(FileName,False, False, True);
end;resize事件代码:procedure TForm1.FormResize(Sender: TObject);
begin
PptApp.width := width-width*0.254;;
PptApp.height:= height;
PptApp.left := 0;
PptApp.top := 0;
end;
var
i:Integer; sCaption:string;
begin
PptApp.visible := true;
sCaption := PptApp.caption;
PptApp.width := width-width*0.254;
PptApp.height:= height;
PptApp.left := 0; PptApp.top := 0;
Winapi.Windows.SetParent(FindWindow(nil,Pchar(sCaption)),self.handle);
PptApp.Presentations.Open(FileName,False, False, True);
end;resize事件代码:procedure TForm1.FormResize(Sender: TObject);
begin
PptApp.width := width-width*0.254;;
PptApp.height:= height;
PptApp.left := 0;
PptApp.top := 0;
end;
解决方案 »
- 记录集操作问题
- 招DELPHI程序员(常州)
- 谁有delphi对 word 的操作资料?
- Bitter_fish(苦鱼) 领分!
- webserver的isapi组件 D7升级到Xe2的困惑
- 程序执行问题?着急。。。
- form在resize时候如何使上面的组件的尺寸也随之改变?
- 为什么在一段代码中多次用setlength改变同一个动态数组的大小编译时总出错?
- 26.7-21.6-5.1=-1.77635683940025E-15 ???
- 国外有什么好的论坛?推荐几个
- Delphi 编写的 console程序为什么没有 mark paste这样的菜单?
- DevExpress VCL for Delphi 7 dxRibbon的ColorScheme属性无法设置
ppt 先试试