Click here to Skip to main content
13,189,506 members (63,774 online)
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,
Vieer
Posted 10-Dec-12 18:41pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.171016.2 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2017
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