Thread: Drive Detection
View Single Post
  #4 (permalink)  
Old 06-25-2008, 01:42 PM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,901
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Further investigation shows that you only get one each of events with these wParam values on a change. There may still be a delay before the device is accessible. Again you need to change the Sub name to WMevent_MagicEvent for the dzEventsMagic library.


Code:
Sub WMEvent_WmEvent
	msg = WMevent.wParam
	Select msg
		Case 32772:	
			Msgbox("Device removed")
		Case 32768
			Msgbox("Device added")
	End Select	
End Sub
Reply With Quote