通过添加ins打开powerpoint中的激光指示器

时间:2011-11-10 11:46:11

标签: c# add-in powerpoint

如何在带有插件的powerpoint2010幻灯片上将鼠标光标变为激光指示器。 enter image description here 默认情况下,通过在SlideShow模式下按下Ctrl + LeftMouseKey来更改光标。 但我希望通过添加代码来改变 我发现了一个属性(PointerType),但它不接受像laserPointer这样的东西:

Application.Presentations[1].SlideShowWindow.View.PointerType = Microsoft.Office.Interop.PowerPoint.PpSlideShowPointerType.ppSlideShowPointerPen;

或者我们可以用脏的方式来做:)比如按代码保持Ctrl + LeftMouseKey吗? TY

3 个答案:

答案 0 :(得分:2)

自2013年以来可能:

((dynamic)pWindow.View).LaserPointerEnabled = true;

答案 1 :(得分:1)

这里是生成激光指针的Ctrl + LeftMouseKey,它不是像其他设置那样切换的方式;只有在按下Ctrl + LeftMouse时才会出现激光指示器。

对象模型中似乎没有任何与此相关的内容,所以除了通过代码将Ctrl和LeftMouse切换为ON之外,我认为你不能这样做。

答案 2 :(得分:1)

没有办法做这些,但你可以使用透明背景的窗体,并做你想要的。 :)) 你可以使用cursor属性来显示你想要的东西