日期:2014-05-18 浏览次数:20978 次
private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) this.pictureBox1.Location = new Point((e.Location.X + this.pictureBox1.Location.X), (e.Location.Y + this.pictureBox1.Location.Y)); }
------解决方案--------------------
我就懒得自己算了,呵呵
经常是先转换屏幕坐标,在换成任何一个窗体的相对坐标