Possible Duplicate:
C# - how do I prevent mousewheel-scrolling in my combobox?
Disable mouse scroll wheel in combobox VB.NET
All I have a problem that I want to make the VerticalScrollBar not scroll in Datagridview when I make the mouse wheeling.
I have get some codes like this:
private void dgwFlowerPics_MouseWheel(object sender, MouseEventArgs e) { int iRowIndex = iSelectedIndex;
if (e.Delta > 0)
{
SendKeys.Send("{UP}");
}
else
{
SendKeys.Send("{DOWN}");
}
}
But the scrollBar still scrolls when I wheel the mouse.How I can resolve it ?