Click here to Skip to main content
15,879,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am using usblibrary.dll in a vb.net 2010 32bit app I'm creating. I was wondering if anyone had a similar issue with this and if so on how to correct it.
My app is a MDI app. When I click a button on the parent form it opens the child form. On the child form I que a list of USB devices from an SQL server. I click on the desired device, and it fills the child form with its attributed stored from the server. I also have a few buttons on this child form. One of them being "Connect" I click this and it connects fine. When I close this child form I call

Private Sub frmHardwareDevice_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
 UsbHidPort1.SpecifiedDevice.Dispose()
 End Sub

When I do this it shuts my whole app down. Any suggestions here.

Thanks in Advance
Posted
Updated 10-Jul-11 19:39pm
v2
Comments
[no name] 11-Jul-11 1:40am    
Edited for CodeBlock.
Maciej Los 11-Jul-11 14:52pm    
Have you any error message?

1 solution

No error messages. It just shuts down the whole app.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900