I have a problem in my code, I have some actions on mouse moves in C # and would like to disable them. Whenever I drag the mouse to the listbox of my form, it already does the action, I would like to leave it in the mouse click, but I am in difficulties, follow the code if someone can help I thank.
private void lstColunasLayout2_MouseMove(object sender, MouseEventArgs e) {
int index = lstColunasLayoutSecundario.IndexFromPoint(new Point(e.X, e.Y));
ListBox lb = sender as ListBox;
if (index >= 0 && lb_item != null) {
lb.SelectedIndex = index;
AtualizaRelacaoColunas(lb);
lb_item = null;
}
}