protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);
            Tchittestinfo hti = new Tchittestinfo(e.X, e.Y);

            HotTabIndex = SendMessage(Handle, TcmHittest, IntPtr.Zero, ref hti);

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            Rectangle r = new Rectangle(_dragStartPosition, Size.Empty);

            r.Inflate(SystemInformation.DragSize);

            TabPage tp = HoverTab();

            if (tp != null && !r.Contains(e.X, e.Y))
            {
                DoDragDrop(tp, DragDropEffects.All);
            }

            _dragStartPosition = Point.Empty;
        }
 private static extern int SendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref Tchittestinfo lParam);