本文共 341 字,大约阅读时间需要 1 分钟。
var transform = PresentationSource.FromVisual(this).CompositionTarget.TransformFromDevice;var mouse = transform.Transform(GetMousePosition());public System.Windows.Point GetMousePosition(){ System.Drawing.Point point = System.Windows.Forms.Control.MousePosition; return new System.Windows.Point(point.X, point.Y);}
或者用PointToScreen
转载地址:http://mnboa.baihongyu.com/