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. Update Controls While Enabling Others

Update Controls While Enabling Others

Scheduled Pinned Locked Moved C#
csharpquestionannouncementlearning
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.
  • T Offline
    T Offline
    thepolishguy
    wrote on last edited by
    #1

    I need to update certain controls on a form in C# while a test sequence is performed that lasts up to 90 seconds while keeping a running record on that same form of the test results. Basically, the top half of the form will be the data entry portion of the form with the relevant text and combo boxes while the bottom portion of the form contains the data being tested. Certain labels and text boxes on the bottom part of the form need to be updated as the test progresses, but I need to enable the user to enter new data in the top half of the form. I thought perhaps multi-threading would solve the trick, but would the threads be able to access the same resource, this one form, at the same time?

    P 1 Reply Last reply
    0
    • T thepolishguy

      I need to update certain controls on a form in C# while a test sequence is performed that lasts up to 90 seconds while keeping a running record on that same form of the test results. Basically, the top half of the form will be the data entry portion of the form with the relevant text and combo boxes while the bottom portion of the form contains the data being tested. Certain labels and text boxes on the bottom part of the form need to be updated as the test progresses, but I need to enable the user to enter new data in the top half of the form. I thought perhaps multi-threading would solve the trick, but would the threads be able to access the same resource, this one form, at the same time?

      P Offline
      P Offline
      perlmunger
      wrote on last edited by
      #2

      Multi-threading *will* solve the problem. You just need to read a bit about synchronizing access to shared resources. There are many articles on the internet that cover this topic. Take a look at this article: http://www.c-sharpcorner.com/Code/2002/April/MultithreadingP3.asp[^] and then do a search for "C# thread synchronization". -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

      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