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. Multithreading...

Multithreading...

Scheduled Pinned Locked Moved C#
helpcsharpc++designcareer
3 Posts 3 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.
  • P Offline
    P Offline
    Peter Molnar
    wrote on last edited by
    #1

    Hello, I wanna write a multithreaded application and I am in need of a feature which is known to me in MFC, but I am unaware of in .NET. The problem is that I wanna spawn a worker thread from one of my forms. I can pass data to my worker thread from my dialog, but it is not enough to me, I also have to manipulate the UI controls of the caller from my worker thread. In MFC one can pass a pointer of the caller dialog to one's worker thread, which does the job. I am sure, there must be a similar thing in .NET too. Please help! Thanks in advance. Peter Molnar

    L C 2 Replies Last reply
    0
    • P Peter Molnar

      Hello, I wanna write a multithreaded application and I am in need of a feature which is known to me in MFC, but I am unaware of in .NET. The problem is that I wanna spawn a worker thread from one of my forms. I can pass data to my worker thread from my dialog, but it is not enough to me, I also have to manipulate the UI controls of the caller from my worker thread. In MFC one can pass a pointer of the caller dialog to one's worker thread, which does the job. I am sure, there must be a similar thing in .NET too. Please help! Thanks in advance. Peter Molnar

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      System.ComponentModel.ISynchronizeInvoke should provide the answers :) Every control implements that interface. top secret
      Download xacc-ide 0.0.3 now!
      See some screenshots

      1 Reply Last reply
      0
      • P Peter Molnar

        Hello, I wanna write a multithreaded application and I am in need of a feature which is known to me in MFC, but I am unaware of in .NET. The problem is that I wanna spawn a worker thread from one of my forms. I can pass data to my worker thread from my dialog, but it is not enough to me, I also have to manipulate the UI controls of the caller from my worker thread. In MFC one can pass a pointer of the caller dialog to one's worker thread, which does the job. I am sure, there must be a similar thing in .NET too. Please help! Thanks in advance. Peter Molnar

        C Offline
        C Offline
        Charlie Williams
        wrote on last edited by
        #3

        Control has an Invoke method that should be used when you need to update a control from a thread other than the one that created it. Use InvokeRequired to determine whether it is necessary to use Invoke. Charlie if(!curlies){ return; }

        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