title: Use mouse scroll anywhere on screen in VB.net
body: <p>I'm trying to setup global shortcut using mouse button and scrolling combination, (scrolling up (or down) whlie pressing right mouse button).</p>
  
  <p>I'm thinking I should try to react to mouse scroll, but I have no idea how to detect mouse wheel outside of form.</p>
  
  <p>Right now I got it to react to mouse click with timer and setting form to always on top (no prolem with it being always on top), but no idea how to progress with it.</p>
  
  <pre><code>Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  
      If MouseButtons.HasFlag(MouseButtons.Right) = True Then
          TextBox1.Text = "YES"
      Else
          TextBox1.Text = "NO"
      End If
  
  End Sub
  </code></pre>
  
  <p>Goal is to make it minimize aplications set by user with that shortcut, just in case that info is helpful. I have rest of the code just cant figure that part out.</p>
  
  <p>EDIT:
  It works inside form with this:</p>
  
  <pre><code>Private Sub ListBoxCHOWAJ_MouseWheel(sender As Object, e As MouseEventArgs) Handles ListBoxCHOWAJ.MouseWheel
  
      If MouseButtons.HasFlag(MouseButtons.Right) = True Then
          If e.Delta &gt; 0 Then
              TextBox1.Text = "up"
          Else
              TextBox1.Text = "down"
          End If
      End If
  
  End Sub
  </code></pre>