开发者

Remote MS PowerPoint slide by socket C#

I want to remote slide PowerPoint use socket C# like: next/previous slide and go to slide number. First, I can connect 2 computer and do something. But I don't know how to remote PowerPoint. I though I could send keystrokes to it, but the problem is I cannot determine exactly presentation windows (Specially window with UNICODE title). Is there any way 开发者_如何学编程to solve this problem? Or how can I remote slide without keystrokes?

Thanks!


I would suggest to use the namespace Microsoft.Office.Interop.PowerPoint from the Primery Interop Assembly for Office. The code should be something like this:

var  ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
ppApp.Visible = MsoTriState.msoTrue;
var ppPresens = ppApp.Presentations;
var  objPres = ppPresens.Open(e.FullPath, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
var  objSlides = objPres.Slides;                                                                            
//Run the Slide show
var objSSS = objPres.SlideShowSettings;    
objSSS.Run();
var objSSWs = ppApp.SlideShowWindows;
while (objSSWs.Count >= 1) 
   System.Threading.Thread.Sleep(1000);
objPres.Close();
ppApp.Quit();


You can use a Presenter Mouse to do this: http://www.microsoft.com/hardware/en-us/p/wireless-notebook-presenter-mouse-8000/9DR-00001

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜