Error on aeButton.GetClickablePoint();

Apr 4, 2011 at 6:31 AM


I want to get the click able point on aeButton. So I used

System.Windows.Point point = aeButton.GetClickablePoint();

but it show

NonComVisibleBaseClass was detected
Message: A QueryInterface call was made requesting the class interface of COM visible managed class 'MS.Internal.AutomationProxies.WindowsButton'. However since this class derives from non COM visible class 'MS.Internal.AutomationProxies.ProxyHwnd', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules.


how to solve this problem?


Apr 5, 2011 at 6:19 AM
Edited Apr 5, 2011 at 6:21 AM

Do you need exactly the ClickablePoint itself? Anyway, if BoundingRectangle property is accessible - you could try to calculate the point by yourself. Of course, simple calculation will not handle "control overlapping" conditions, but still.

Or, if you only need to press the button - what about using of InvokePattern? Not very fair from the user action simulation perspective, but better than nothing.,