Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

c# - Controlling PowerPoint Slideshow

When a slideshow running in PowerPoint I want to control the movement (Next and Previous) of the slides. Of course it is possible with the > and < button on the keyboard, but is there any way in which I can have a custom application listening to the Next and Previous controls?

My custom application has nothing but 2 buttons, next and previous, when I click either, the button's event handler should pass the control to the PowerPoint application running the slideshow. And thus, PowerPoint will move the slideshow back or forward?

Somewhat similar to the way remote, wireless PowerPoint Presenters work on the s/w end.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yeah, totally doable. The event you want is SlideShowNextSlide - you can read more about it here. For C# and PowerPoint-specific, this is a great article: How to handle PowerPoint events with Visual C# .NET.

Also, this search on SO turns up some good reading and things to watch out for. Finally, I don't know if C# has one, but there is a "Remotely Controlling PowerPoint" sample in both VS2008/VS2010 for VB.NET that is probably easy enough to port to C# - here's the info page on it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...