ex: I have a series of PictureBoxes (10 rows x 6 columns) internal to a panel, I do not use datagrdiview. I have to understand when the PicureBox I drag arrives at row 6, to increase the VertScrollBar.Value, to display the next line with MouseHover and MouseMove I can get to know the potion of each PictureBox, I have to during Drag&Drop does not trigger the MouseMove event. There is no DragMove event
pictBox[i].MouseHover += new EventHandler(picHover_Click); pictBox[i].MouseLeave += new EventHandler(picLeave_Click); pictBox[i].MouseDown += picture_MouseDown; pictBox[i].MouseMove += picture_MouseMove; pictBox[i].AllowDrop = true;
private void picture_MouseMove(object sender, MouseEventArgs e) { lblMesg.Visible = true; lblMesg.Text = pnlCatalogo.VerticalScroll.Value.ToString() + " - " + ThumbActive.ToString(); }
This a possible solution //Yposition = mouse position to verify private void pict_DragLeave(object sender, EventArgs e) { if (Control.MousePosition.Y > Yposition) { pnlCatalogo.VerticalScroll.Value = pnlCatalogo.VerticalScroll.Value + 200; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)