public int diff_x; public int diff_y; public bool mouse_down = false; private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { diff_x = Form.MousePosition.X - Form.ActiveForm.Location.X; diff_y = Form.MousePosition.Y - Form.ActiveForm.Location.Y; mouse_down = true; }
public int diff_x;
public int diff_y;
public bool mouse_down = false;
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
diff_x = Form.MousePosition.X - Form.ActiveForm.Location.X;
diff_y = Form.MousePosition.Y - Form.ActiveForm.Location.Y;
mouse_down = true;
}
public
mouse_down
true
private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (mouse_down == true) { Point p = new Point(MousePosition.X - diff_x, MousePosition.Y - diff_y); Form.ActiveForm.Location = p; } }
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
if (mouse_down == true)
Point p = new Point(MousePosition.X - diff_x, MousePosition.Y - diff_y);
Form.ActiveForm.Location = p;
private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { mouse_down = false; }
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
mouse_down = false;
false
private void button1_Click(object sender, EventArgs e) { Dispose(); this.Close(); }
private void button1_Click(object sender, EventArgs e)
Dispose();
this.Close();
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: