我正在编写类似于TeamViewer的程序。我传输连接到表单的计算机的图像。当我缩小窗体时,鼠标光标不会到达我想要的位置。我怎么解决这个问题?代码已关闭。
private void pbResim_MouseMove(object sender, MouseEventArgs e)
{
int x = e.X;
int y = e.Y;
Socket soket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
soket.Connect(IPAddress.Parse(karsiIP), 14533);
byte[] gonderilcek = Encoding.UTF8.GetBytes(x.ToString() + ":" + y.ToString() + "|MouseMove");
soket.Send(gonderilcek);
soket.Close();
}