如何知道PPT当前状态?(100)

  • 主题发起人 主题发起人 wgj
  • 开始时间 开始时间
W

wgj

Unregistered / Unconfirmed
GUEST, unregistred user!
不通过dephi来播放ppt,而是直接用powerpoint本身来放,我的程序如何知道它现在在放映状态还是停止状态?谢谢!
 
大概就是这样了: if PowerPointApplication1 = nil then begin PowerPointApplication1 := TPowerPointApplication.Create(Self); with PowerPointApplication1 do begin AutoConnect := False; ConnectKind := ckRunningInstance; AutoQuit := False; end; end; try PowerPointApplication1.Connect; except Caption := '请先启动PPT'; Exit; end; if PowerPointApplication1.ActivePresentation = nil then begin Caption := 'No Presentation Opened'; Exit; end; if PowerPointApplication1.ActivePresentation.SlideShowWindow = nil then begin Caption := 'No SlideShow'; Exit; end; case PowerPointApplication1.ActivePresentation.SlideShowWindow.View.State of ppSlideShowRunning: Caption := 'ppSlideShowRunning'; ppSlideShowPaused: Caption := 'ppSlideShowPaused'; ppSlideShowBlackScreen: Caption := 'ppSlideShowBlackScreen'; ppSlideShowWhiteScreen: Caption := 'ppSlideShowWhiteScreen'; ppSlideShowDone: Caption := 'ppSlideShowDone'; end;
 

Similar threads

回复
0
查看
804
不得闲
回复
0
查看
848
不得闲
D
回复
0
查看
911
DelphiTeacher的专栏
D
D
回复
0
查看
868
DelphiTeacher的专栏
D
后退
顶部