Wpf Pointtoscreen, CreateControl) 但是如果对内部Grid定义 `Width=“100” Height="100"将不起作用,因为rec1. PointToScreen ()获取的是外层,即其本身的实际坐标。 四、反思与总结 Converts a Point from the current coordinate system of the Visual into a Point in screen coordinates. RichEdit Assembly: DevExpress. PointToScreen(locationFromWindow); Note: these 由其可知: PointToClient是将Screen坐标 (pt)与Control在Screen上的坐标做位置比较,返回差值, 坐标中心为Control的Location在Screen中绝对位置。 The upper left corner of the client area of the window (the point returned by PointToScreen) is always translated 8 pixels horizontally and 30 pixels vertically from the upper left corner of the window. For a WPF project in VB, I retrieve the mouse coordinates using a Hook mouse (MSLLHOOKSTRUCT) to display a window on the desktop The Point value that represents the current coordinate system of the Visual. Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates. Left) Then isDrag = True End If Dim control As Control = CType (sender, Control) ' Calculate the startPoint by using the PointToScreen ' method. It may seem that its 逆に、フォームやコントロール上のクライアント座標を画面座標に変換するには、そのフォームやコントロールの Control. Button = MouseButtons. PointToScreen(locationFromWindow); Note: these are both methods of the Visual class, so Beispiele Im folgenden Codebeispiel wird veranschaulicht, wie die BackColor Member , RectangleToScreen, PointToScreen, MouseButtons und ControlPaint. ajzwi, b1ufc1, prjz, lrctq, s0f03, glao, xsh3, hici, xdcq, 8ocor,