0

I am writing an application that runs in the taskbar and displays the main form when it recognises a USB device has been inserted/disconnected. So far I've been able to create an application that runs in the taskbar and has all the relevant forms.

I'm currently struggling with how to detect USB Notifications (I believe WM_DEVICECHANGE). And how to perform an action based upon this.

Could someone point me in the right direction of how to achieve this?

Thank You

Ali
  • 1
  • perhaps instead of using WMI if you are not too sure how to use it, you could use `DriveInfo` with a timer to detect if any new removable devices are added. – user1234433222 Oct 05 '17 at 13:01
  • Maybe [Multiple device inserted notifications](https://stackoverflow.com/a/28226662/1115360) will help. Otherwise, google for "vb.net wm_devicechange". – Andrew Morton Oct 05 '17 at 13:07
  • Please read [ask] and take the [tour]. You need to do more research; start with the premise that with 15,000,000 questions posted, SO probably already has an answer. – Ňɏssa Pøngjǣrdenlarp Oct 05 '17 at 17:22

0 Answers0