如何让幻灯片在vb的框架里播放
'Microsoft PowerPoint 9.0(Office 2000的,如果是97则是8.0) Object Library)
''Microsoft PowerPoint 11.0(Office 2003) Object Library)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '延时API声明
Private Sub Form_Load()
Dim ppt As New PowerPoint.Application
Dim pres As Presentation
ppt.Visible = True
Set pres = ppt.Presentations.Open(App.Path & "/Test.ppt") '填入你的文件名
With pres.SlideShowSettings
.Run
While pres.SlideShowWindow.View.State <> ppSlideShowDone
ppt.SlideShowWindows(1).View.Next
Sleep 1000'填入延迟的时间调整快慢(毫秒)
WendEnd Withpres.Closeppt.QuitSet pres = NothingSet ppt = NothingEnd Sub
原文链接:https://www.f2er.com/vb/262464.html