2017-10-11 58 views
0

我在Visual Studio面板中附加了PowerPoint演示幻灯片。我想动态更改我的幻灯片窗口高度和宽度。所以我已经将值0分配给左侧和顶部属性。但它没有考虑到这个价值。它每次都抛出一些randow值。无法更改幻灯片放映窗口高度c#

PowerPoint.SlideShowSettings sst = null; 

PowerPoint.SlideShowWindow sw=null; 

sst = presentation.SlideShowSettings; 

sw = sst.Run(); 

sw.Left = 0; 
sw.Top = 0; 

我在做什么错?

+0

请格式化您的问题。 –

回答

0

我重置幻灯片的父母,比我一再使用的setparent。

SetParent(pptptr,(IntPtr)null);

SetParent(pptptr,panel11.Handle);

现在它工作正常