Mouse wheel event usage

Sample code:

private void MediaPlayer1_MouseEnter(object sender, EventArgs e) 
{ 
  if (!MediaPlayer1.Focused) 
  { 
    MediaPlayer1.Focus(); 
  } 
}

private void MediaPlayer1_MouseLeave(object sender, EventArgs e) 
{ 
  if (MediaPlayer1.Focused) 
  { 
    MediaPlayer1.Parent.Focus(); 
  } 
}

private void MediaPlayer1_MouseWheel(object sender, MouseEventArgs e) 
{ 
  mmLog.Text += "Delta: " + e.Delta + Environment.NewLine; 
}

VisioForge © 2006-2019

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel