目前有两个方案,都有所不足。
一、用自带的Server类组件,通过PPT直接打开,缺点是无法嵌入窗口中,只能全屏显示
二、用内嵌IE控件打开,效果不错,但受到不同IE版本、Windows版本和OFFICE版本的限制,有时不能直接打开,只能下载保存。请问各位有没有什么更好的办法在Delphi窗口中查看PPT文件?

解决方案 »

  1.   

    内嵌IE控件效果最好,一般的机器最少ie6,ppt文件的版本不要太多,大部分机器都是可以的
    如果想追求完美,估计只有自己解析ppt文件了
      

  2.   

    “有时不能直接打开,只能下载保存”
    一般都是Office版本、IE设置原因,可以把最新的Office查看器及IE的设置脚本打包在安装文件中,并在文档中说明
      

  3.   

    缺点是无法嵌入窗口中,只能全屏显示
    虽然没试过,但是打开的窗体有句柄么?用setparent调整下不行么?
      

  4.   

    一个新的策略是使用DSOFramer,打开其他Office文档的效果貌似也不错,不过DSOFramer对PowerPoint的支持很不好,而且对Delphi的支持也不好。用IE打开的话,低版本的IE和Office基本没问题,但高版本中,尤其是在win7下会出现许多莫名其妙的问题,有的机器上设置了就可以用,有的同样的设置就不能用。
      

  5.   

    PowerPoint in it’s own window or Form w/o the annoying Flash April 16, 2008 
    Posted by spunkyvt in PowerPoint, Programming. 
    Tags: Automation, dsoFramer, PowerPoint, zero Flash
    2 comments 
    After much searching and digging. I have finally found a solution. First you must download the dsoFramer active x control from microsoft. After that we can code.Place the Framer on the Form.Add a reference to the InteropServices. ie.using System.Runtime.InteropServices;Add this DllImport[DllImport("user32.dll", EntryPoint = "LockWindowUpdate", SetLastError = true,
    ExactSpelling = true, CharSet = CharSet.Auto,
    CallingConvention = CallingConvention.StdCall)]
    private static extern long LockWindow(long Handle);Add a button to the Formand put this code in button clickFramer.FrameHookPolicy = DSOFramer.dsoFrameHookPolicy.dsoSetOnFirstOpen;LockWindow(Framer.Handle.ToInt32());
    Framer.Open(@”c:\Presentation1.ppt”);Framer.Activate();
    SendKeys.Send(“{F5}”);
    Framer.BackColor = Color.Black;
    LockWindow(IntPtr.Zero.ToInt32());You now have a functioning slideshow inside of your form.If you need control over the slideshow?????????Well add a reference to you favorite Powerpoint Dlladd using PowerPoint = Microsoft.Office.Interop.PowerPoint;Define a variablePowerPoint.Presentation pres;In the button click add thispres = (PowerPoint.Presentation)Framer.ActiveDocument;It’s crazy but you would have to pay 999 from EDraw Office Viewer Component for this same functionality.MEOUCH!!!!!!!
      

  6.   

    感觉orxor的方法比较靠谱,想尝试一下。
      

  7.   

    可惜所给的例子是.net的,有delphi的就更方便了。