谁能给解释下这段代码?怎么都看不懂,最好加个注释
static int frmLastWidth = 0;static int frmLastHeight = 0;
static int frmWidth;
static int frmHeight;
static bool frmIsResizing = false;
System.Drawing.Rectangle frmRectangle = new System.Drawing.Rectangle();
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int sizeageX=(MousePosition .X -this.Location .X );
int sizeageY = (MousePosition.Y - this.Location.Y);
if (sizeageX < 240)
sizeageX = 240;
if (sizeageY < 100)
sizeageY = 100;
frmWidth = sizeageX;
frmHeight = sizeageY;
if (frmLastWidth == 0)
frmLastWidth = frmWidth;
if (frmLastHeight == 0)
frmLastHeight = frmHeight;
if (frmIsResizing)
{
frmRectangle.Location = new System.Drawing.Point(this.Left, this.Top);
frmRectangle.Size = new System.Drawing.Size(frmLastWidth, frmLastHeight);
}
frmIsResizing = true;
ControlPaint.DrawReversibleFrame(frmRectangle, Color.Empty, System.Windows.Forms.FrameStyle.Thick);
frmLastWidth = frmWidth;
frmLastHeight = frmHeight;
frmRectangle.Location = new System.Drawing.Point(this.Left, this.Top);
frmRectangle.Size = new System.Drawing.Size(frmLastWidth, frmLastHeight);
ControlPaint.DrawReversibleFrame(frmRectangle, Color.Empty, System.Windows.Forms.FrameStyle.Thick);
}