如何用vb播放幻灯片

前端之家收集整理的这篇文章主要介绍了如何用vb播放幻灯片前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

如何让幻灯片在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

猜你在找的VB相关文章