C# 找不到System.Windows.Point
我正在使用C# 找不到System.Windows.Point,c#,windows,winforms,ui-automation,point,C#,Windows,Winforms,Ui Automation,Point,我正在使用UIAutomation方法 System.Windows.Automation.AutomationElement.FromPoint(System.Windows.Point) 通过鼠标光标获取元素,但我找不到类型System.Windows.Point。我查找了对象库,但它仍然不可见 我使用的是.NETFramework4.5 System.Windows.Point是WPF的一部分,如果您试图在WinForms应用程序中执行此操作,则不受支持–Peter Ritchie 10
UIAutomation
方法
System.Windows.Automation.AutomationElement.FromPoint(System.Windows.Point)
通过鼠标光标获取元素,但我找不到类型
System.Windows.Point
。我查找了对象库,但它仍然不可见
我使用的是.NETFramework4.5
System.Windows.Point是WPF的一部分,如果您试图在WinForms应用程序中执行此操作,则不受支持–Peter Ritchie 10月4日0:10
System.Windows.Point
是WPF的一部分,如果您试图在WinForms应用程序中执行此操作,则不受支持。请添加对“WindowsBase”的引用。谢谢,Hans,它可以工作@汉斯帕桑,你能把那个评论转换成答案吗?