private void tabControlNotepad_MouseDown(object sender, MouseEventArgs e) { if (tabControlNotepad.SelectedIndex < 0) { return; } int i = tabControlNotepad.SelectedIndex; _dropData = new TabDropData { SourceIndex = i, DoingDragDrop = false, InitialPosition = e.Location }; }
private void tabControlNotepad_MouseUp(object sender, MouseEventArgs e) { _dropData = null; }