如何在excel工作簿中找到包含最小化,恢复,关闭按钮的区域 [英] How to find the area which contains minimize, restore, close buttons in excel workbook

查看:512
本文介绍了如何在excel工作簿中找到包含最小化,恢复,关闭按钮的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Gurus,



我有一个excel应用程序通过COM插件与C#应用程序通信。我需要弄清楚Excel工作簿中包含的区域Excel最小化/最大化/关闭按钮。所以,我可以在该区域捕获鼠标点击事件并做一些事情。

如果有人已经探索过它。请帮忙。



在此先感谢。



问候,

Vieer

Hello Gurus,

I have an excel application which communicates to a C# application via COM addins.I need to figure out the area in the Excel workbook which contains the Excel mimimize/maximize/close buttons. So, that I could capture the mouse click event in that area and do something.
If anyone already explored it. Please help.

Thanks in Advance.

Regards,
Vieer

推荐答案

据我所知,您无法捕获Excel中的最小化/最大化事件(Workbook.WindowResize事件不会触发)。

您可以使用您的C#应用​​程序轮询excel对象并查询它的窗口状态来克服它。



捕获Excel中的关闭按钮使用Workbook.BeforeClose事件
To the best of my knowledge you can''t capture the minimise/maximise events in Excel (the Workbook.WindowResize event does not fire).
You could use your C# application to poll the excel object and query it''s windowstate to get over that.

Capture the Close button in Excel with the Workbook.BeforeClose event


这篇关于如何在excel工作簿中找到包含最小化,恢复,关闭按钮的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆