Click here to Skip to main content
13,458,736 members
Rate this:
Please Sign up or sign in to vote.
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,
Posted 10-Dec-12 18:41pm
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180323.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100