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. cross thread..? How to populated a textbox with serial input?I

cross thread..? How to populated a textbox with serial input?I

Scheduled Pinned Locked Moved C#
helptutorialquestion
5 Posts 4 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.
  • M Offline
    M Offline
    mercenary01
    wrote on last edited by
    #1

    I am getting some serial inputs and storing them into a buffer when I want to place the contents onto the textbox from the buffer...a cross thread violation error comes up...I am running the textbox from the interrupt function of the serial comm. any advise? Thanks samuel

    B 1 Reply Last reply
    0
    • M mercenary01

      I am getting some serial inputs and storing them into a buffer when I want to place the contents onto the textbox from the buffer...a cross thread violation error comes up...I am running the textbox from the interrupt function of the serial comm. any advise? Thanks samuel

      B Offline
      B Offline
      bigbrownbeaver
      wrote on last edited by
      #2

      This should fix your problem... public Form1() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; }

      B 1 Reply Last reply
      0
      • B bigbrownbeaver

        This should fix your problem... public Form1() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; }

        B Offline
        B Offline
        blackjack2150
        wrote on last edited by
        #3

        Look at what I got for the same answer: http://www.codeproject.com/script/comments/forums.asp?msg=2170602&forumid=1649&Page=2&userid=3539989&mode=all#xx2170602xx[^]

        B 1 Reply Last reply
        0
        • B blackjack2150

          Look at what I got for the same answer: http://www.codeproject.com/script/comments/forums.asp?msg=2170602&forumid=1649&Page=2&userid=3539989&mode=all#xx2170602xx[^]

          B Offline
          B Offline
          bigbrownbeaver
          wrote on last edited by
          #4

          Wow that helps me alot... I have been having trouble with my GUI hanging... Thanx!!!

          L 1 Reply Last reply
          0
          • B bigbrownbeaver

            Wow that helps me alot... I have been having trouble with my GUI hanging... Thanx!!!

            L Offline
            L Offline
            lmoelleb
            wrote on last edited by
            #5

            Maybe you could edit your original reply where you suggest to disable the check? People who read it might not follow the link to the previous discussions and actually think they have found a solution. And as it often appears to work after a quick test they would be in the dark why their GUI hangs.

            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