[求助]如何获取鼠标坐标?
请问中如何获取鼠标坐标?MousePosition这个好像是以屏幕坐标表示的,那怎样才能用窗口坐标表示?如何把鼠标坐标的X和Y坐标单独提取出来?感谢各位指教!
猎取窗体坐标:
TextBox1.Text = Me.PointToClient(Me.MousePosition).X
TextBox2.Text = Me.PointToClient(Me.MousePosition).Y
猎取控件坐标:
TextBox1.Text = Me.Panel1.PointToClient(Me.MousePosition).X
TextBox2.Text = Me.Panel1.PointToClient(Me.MousePosition).Y