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. .NET (Core and Framework)
  4. access frm inside thread to form controls

access frm inside thread to form controls

Scheduled Pinned Locked Moved .NET (Core and Framework)
comhelpquestion
3 Posts 3 Posters 1 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.
  • H Offline
    H Offline
    Hamid Agha
    wrote on last edited by
    #1

    I create a thread with sub1 of form1 subs. In sub1 i want to access to form1 controls. but it cause InvalidOperationException error and this error description : "Cross-thread operation not valid: Control 'Status' accessed from a thread other than the thread it was created on." what cant id do? hhamidreza62@yahoo.com

    C RaviBeeR 2 Replies Last reply
    0
    • H Hamid Agha

      I create a thread with sub1 of form1 subs. In sub1 i want to access to form1 controls. but it cause InvalidOperationException error and this error description : "Cross-thread operation not valid: Control 'Status' accessed from a thread other than the thread it was created on." what cant id do? hhamidreza62@yahoo.com

      C Offline
      C Offline
      Chris Richner
      wrote on last edited by
      #2

      Hi, If you running against .net 2.0 use the BackgroundWorker component to avoid this issue. Otherwise crawl trough the cp articles related to threading GUI issues. myMsg.BehindDaKeys = "Jerry Maguire";

      1 Reply Last reply
      0
      • H Hamid Agha

        I create a thread with sub1 of form1 subs. In sub1 i want to access to form1 controls. but it cause InvalidOperationException error and this error description : "Cross-thread operation not valid: Control 'Status' accessed from a thread other than the thread it was created on." what cant id do? hhamidreza62@yahoo.com

        RaviBeeR Offline
        RaviBeeR Offline
        RaviBee
        wrote on last edited by
        #3

        Hamid, see this[^] article. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

        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