日期:2014-05-17 浏览次数:20884 次
class DragForm
{
private int x;
private int y;
private Point yyy;
private bool _t;
public bool t
{
get { return t; }
set { _t = value; }
}
public void setXy(Control f)
{
yyy =f.PointToClient(Control.MousePosition);
}
public void dragForm(Control f)
{
Point xxx = Control.MousePosition;
x = xxx.X;
y = xxx.Y;
if (_t == true)
{
f.Top = y - yyy.Y;
f.Left = x - yyy.X;
}
}
}