I have a panel in my form where I paste pictures.
The panel is autoscroll. To react to the mouse wheel wrote this:
void PanelCtl_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
int numberOfTextLinesToMove = e.Delta * SystemInformation.MouseWheelScrollLines / 120;
int numberOfPixelsToMove = numberOfTextLinesToMove * 20;
}
and I want to scroll the panel according to the wheel movement.
How can I scroll the panel?
The panel is autoscroll. To react to the mouse wheel wrote this:
void PanelCtl_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
int numberOfTextLinesToMove = e.Delta * SystemInformation.MouseWheelScrollLines / 120;
int numberOfPixelsToMove = numberOfTextLinesToMove * 20;
}
and I want to scroll the panel according to the wheel movement.
How can I scroll the panel?