/// <summary> /// Event raised when this control is being dragged on the screen /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CaptionDraggingEvent(object sender, CaptionDraggingEventArgs e) { if (moveable == true) { //set the new location this.Location = new Point(this.Location.X - e.Width, this.Location.Y - e.Height); } }
/// <summary> /// Event raised when this control is being dragged on the screen /// </summary> /// <param name = "sender"></param> /// <param name = "e"></param> private void CaptionDraggingEvent(object sender, CaptionDraggingEventArgs e) { if (moveable) { //set the new location Location = new Point(Location.X - e.Width, Location.Y - e.Height); } }