简体   繁体   English

在vsto中访问形状事件

[英]accessing shape events in vsto

I added a shape to my spreadsheet this way : 我通过以下方式向电子表格添加了形状:

MOC.MsoAutoShapeType DefaultShape = MOC.MsoAutoShapeType.msoShapeRectangle;
Microsoft.Office.Interop.Excel.Shape CurBlock = Activesheet.Shapes.AddShape(DefaultShape, Left , Top, Width, Height);

However I can't figure out how to access any of the shape's events 但是我不知道如何访问任何形状的事件

Anyone know how to do this? 有人知道怎么做吗?

There is none. 空无一人。 The link @Gedde provided explains how to build custom events. 提供的@Gedde链接说明了如何构建自定义事件。 In a nutshell, you must respond to the 'private void commandBars_OnUpdate()' which is the only event that gets fired when you do anything on the spreadsheet. 简而言之,您必须响应“ private void commandBars_OnUpdate()”,这是在电子表格上执行任何操作时唯一触发的事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM