w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Disabling scroll on condition

I guess you would have to implement the KeyDown as well as the KeyUp event and check if CTRL has been pressed/released.

Once you have that you can disable the Autoscroll property on your splitpanel

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
  if (e.Control)
  {
    splitpanel.AutoScroll = false;
  }
}

private void Form1_KeyUp(object sender, KeyEventArgs e)
{
  if (e.Control)
  {
    splitpanel.AutoScroll = true;
  }
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.