Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2007

Tip: Looking for answers? Try searching our database.

VB 2005 Serial Port Close() Method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 02 May 2007 21:54 GMT
Hey all,

I am having problems with the close method of the serial port class in
vb 2005. I have a button on a form that calls the Close() method, but
every now and then the program freezes. I have go into task manager to
end the process to get it to stop.

Just before I call the close() method, I discard the TX/RX buffers and
RemoveHandler my handles to DataReceived and ErrorReceived.

Any insight? Thanks,

Steve P
Steve - 02 May 2007 23:07 GMT
I ended up writing in a timer to expire in 100ms after destroying the
handle and THEN close the port. It seems to work every time.

I think it is probably due to the handle to the DataReceived event.

Steve

> Hey all,
>
[quoted text clipped - 9 lines]
>
> Steve P

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.