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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Form created by thread inaccessible

Form created by thread inaccessible

Scheduled Pinned Locked Moved Visual Basic
question
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.
  • R Offline
    R Offline
    RJGCarey
    wrote on last edited by
    #1

    I have created a new instance of a form from a thread that responds to incoming UDP packets from another computer. This form shows up in the screen but the user cannot use it’s command buttons. Other threads cannot manipulate it’s variables or cause a paint event on it’s picture box. How does one accomplish these things? Thanks. RCarey

    J 1 Reply Last reply
    0
    • R RJGCarey

      I have created a new instance of a form from a thread that responds to incoming UDP packets from another computer. This form shows up in the screen but the user cannot use it’s command buttons. Other threads cannot manipulate it’s variables or cause a paint event on it’s picture box. How does one accomplish these things? Thanks. RCarey

      J Offline
      J Offline
      Joshua Quick
      wrote on last edited by
      #2

      Forms are not thread safe. Because of this, I highly recommend that you display all of your forms on the same thread. If you need a separate thread to manipulate a form's contents, then look into using the BeginInvoke() method. See the below link for more details. http://www.codeproject.com/csharp/begininvoke.asp[^]

      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