Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool MouseDown { get; set; }
- private System.Drawing.Point LastLocation { get; set; }
- private void labelGetId_MouseDown(object sender, MouseEventArgs e)
- {
- MouseDown = true;
- LastLocation = e.Location;
- }
- private void labelGetId_MouseMove(object sender, MouseEventArgs e)
- {
- if (MouseDown)
- {
- this.Location = new System.Drawing.Point(
- (this.Location.X - LastLocation.X) + e.X, (this.Location.Y - LastLocation.Y) + e.Y);
- this.Update();
- }
- }
- private void labelGetId_MouseUp(object sender, MouseEventArgs e)
- {
- MouseDown = false;
- }
Add Comment
Please, Sign In to add comment