Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Cant close serial port in windows form application

Cant close serial port in windows form application

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bigbrownbeaver
    wrote on last edited by
    #1

    The problem is when I close the port my program hangs. When I close the serial port, or the form, my program throws an exception, after hanging for a while. Basically it hangs whenever I call SerialPort.Close(); Help would be greatly appreciated :)

    C 1 Reply Last reply
    0
    • B bigbrownbeaver

      The problem is when I close the port my program hangs. When I close the serial port, or the form, my program throws an exception, after hanging for a while. Basically it hangs whenever I call SerialPort.Close(); Help would be greatly appreciated :)

      C Offline
      C Offline
      c0ax_lx
      wrote on last edited by
      #2

      can you post some code? do you have any program loops reading input from the port? what is the error exception.message?

      If it' stuck, DO NOT pull harder!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups