ozzy

ozzy

  • NA
  • 13
  • 0

Serial port "Access Denied"

Mar 10 2010 4:59 AM
I have a serial port in my form (c# winform). When I load my form, it runs the code serialport1.open(); And it works fine, I can get what I need from serial port however when I reload the form, it gives me the error "Access to the port 'COM1' is denied." I tried to use if serialport1.IsOpen() then serialport1.close(); But it didn't work. Serial port is accessible and works fine. It just gives me that error. How can I solve this problem?

Answers (5)