weber
Posts: 13
Joined: Wed Aug 03, 2005 8:11 pm
Location: Spain

VB. NET application does not exit properly.

Fri Aug 17, 2007 5:03 pm

Hi,

I have written an application in MS VB .NET Framework. I use serial tools to read and write from com1.

When I exit the program, the process is still active in the windows process list, so I cannot restart the program without manully removing the program from the process list.

I close the program by closing the form but I have also tried.

objport.dispose
application.exit

Any ideas ?

Erik

User avatar
johan
GpsGate
Posts: 14387
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: VB. NET application does not exit properly.

Fri Aug 17, 2007 5:54 pm

You must make sure POrt.Dispose() is called, or else it won't exit
http://franson.com/serialtools/reference_manual.asp?comp=serial&class=Port&item=Dispose&platform=net

Set a breakpoint at the line to make sure it is called. If you see it isn't called, redesign your code in a way you make sure you do call Dispose()

Regards,
Johan

Franson Support

Return to “SerialTools”