Reorder
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I had write this code to do drag and drop at window form panel. How can i do the reorder panel because this code only to do drag and drop? using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace CMSMS { public class mypanel:System.Windows.Forms.Panel { private bool isDragging=false; public int x,y; protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown (e); isDragging = true; x = e.X; y = e.Y; } protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp (e); isDragging = false; } protected override void OnMouseMove(MouseEventArgs e) { if (isDragging == true) { this.Left= e.X + this.Left - x; this.Top = e.Y + this.Top - y; } } } }