我想问你一个问题  关于PPT文档 的 .也就是说 怎样在winforn窗体里面打开一个ppt文档,然后自动播放,并且不能拷贝另存为操作,能做到吗???   其实也就是公司想一个专人把PPT文档上传到数据库,然后指定权限的人可以打开观看,但是又不能让他拷贝或者另存为到本地,因为是公司资料,大家有什么好办法吗???

解决方案 »

  1.   

    http://support.microsoft.com/kb/265385
      

  2.   

    Private Sub Command1_Click()
     ' Set a reference to the Microsoft PowerPointViewer 8.0 Object Library
     ' (msppt8vr.olb) from the Project|References dialog.
       Dim oPPTViewer As PowerPointViewer.Application
       Dim oPPTShow As PowerPointViewer.SlideShowView
       Dim sPPTFile As String
        
     ' Choose a PowerPoint file to open...
       sPPTFile = "C:\DsTest.ppt"
        
     ' Start an instance of the viewer. This may fail if the viewer is
     ' already running. You can use GetObject to get the running viewer,
     ' however you cannot open a new slide show if another show is in
     ' progress. So, if this fails, we can't continue.
       Set oPPTViewer = CreateObject("PowerPointViewer.Application")
            
     ' Start the show and get a SlideShowView object...
       Set oPPTShow = oPPTViewer.NewShow(sPPTFile, _
                           ppViewerSlideShowManualAdvance, True)
       
     ' Display the number of slides in this view...
       MsgBox "Slides in this show = " & Str(oPPTShow.SlidesCount), _
              vbMsgBoxSetForeground
       
     ' Exit the slide show and quit (just to demo you can do this)...
       oPPTShow.Exit
       Set oPPTShow = Nothing
       
       oPPTViewer.Quit
       Set oPPTViewer = Nothing
       
    End Sub如果换成用C#写 该怎么办呀 ,有人知道吗?
      

  3.   

    我现在用的是:axWebBrowser 控件  我打开的是PPT 文件 .想屏蔽右键功能,不让人家复制,另存为.  谢谢高手回答一下哟
      

  4.   

    把上段代码改成C#如下:
    Private void Command1_Click()
      {
       PowerPointViewer.Application oPPTViewer =new PowerPointViewer.Application();
       PowerPointViewer.SlideShowView  oPPTShow =new PowerPointViewer.SlideShowView();
       string sPPTFile ="C:\DsTest.ppt";
       oPPTViewer = CreateObject("PowerPointViewer.Application")
       oPPTShow = oPPTViewer.NewShow(sPPTFile, _ppViewerSlideShowManualAdvance, True)   //MsgBox "Slides in this show = " & Str(oPPTShow.SlidesCount), _vbMsgBoxSetForeground
       MessageBox.Show(oPPTShow.SlidesCount);   oPPTShow.Exit
        oPPTShow ="";
       
       oPPTViewer.Quit
       oPPTViewer ="";
       
    }