Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I need to find out the area of the Excel Workbook's rightmost corner which contains minimize/maximize/close buttons.So that I could capture the click event in that particular area and perform some functionality in our c# application.
If anyone already know, please share.

Thanks in Advance,
Vieer
Posted
Comments
John d. Bartels 12-Dec-12 18:32pm    
Add UIAutomationTypes and UIAutomationClient References (in the System.Windows.Automation namespace) to your project, then you can get to excel by way of the Root Element (the desktop), and you can get the button that you want to listen for an event from. There is a Property for the AutomationElement that specifies the rectangular bounds of a button. Also, I believe it is possible to "Listen" for events using these classes as well.

http://msdn.microsoft.com/en-us/library/aa348551.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900