XtraTabHitInfo hinfo = default(XtraTabHitInfo);
XtraTabPage hoverTab = default(XtraTabPage);
XtraTabPage dragTab = default(XtraTabPage);
XtraTabPage selTab = default(XtraTabPage);
XtraTabPage repTab = default(XtraTabPage);
//
int itemDragIndex = 0;
int dropLocationIndex = 0;
//
// get the tab we are hovering over.
hinfo = xtcMain.CalcHitInfo(xtcMain.PointToClient(new Point(e.X, e.Y)));
//
if ((hinfo.Page != null))
{
hoverTab = hinfo.Page;
//Make sure there is a TabPage being dragged.
if (e.Data.GetDataPresent(typeof(XtraTabPage)))
{
e.Effect = DragDropEffects.Move;
dragTab = (XtraTabPage)e.Data.GetData(typeof(XtraTabPage));
// can't use the TabIndex on the control because it changes
// when we move