title: How to detect insertion and removal of other USB Peripherals?
body: <p>Why is it that this VB.NET code only works for detecting flash disks?</p>
  
  <pre><code>Select Case m.WParam
      Case WM_DEVICECHANGE_WPPARAMS.DBT_DEVICEARRIVAL
          MsgBox("USB Inserted")
      Case WM_DEVICECHANGE_WPPARAMS.DBT_DEVICEREMOVECOMPLETE
          MsgBox("USB Removed")
  End Select
  </code></pre>
  
  <p>What would be the possible way to detect the insertion and removal of other USB peripherals, such as mouse and keyboard?</p>