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. show form from worker thread

show form from worker thread

Scheduled Pinned Locked Moved C#
question
5 Posts 2 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.
  • A Offline
    A Offline
    Alastair Stell
    wrote on last edited by
    #1

    I have created a worker thread. Now I would like to create a separate window (form) to watch the progress of the thread. I specifically do NOT want to use an invoke back to the main form because I'm starting several such threads and wish to monitor them independantly. Obviously I would like the worker thread to directly create and show its own form. Well I can easily create and show a form from the worker thread, however the form is not receiving window events and consequently nothing much happens. What do I need to do in order to get this form to respond to windows messages? Any advice people? Thanks Alastair Only change is constant unless it isn't

    C 1 Reply Last reply
    0
    • A Alastair Stell

      I have created a worker thread. Now I would like to create a separate window (form) to watch the progress of the thread. I specifically do NOT want to use an invoke back to the main form because I'm starting several such threads and wish to monitor them independantly. Obviously I would like the worker thread to directly create and show its own form. Well I can easily create and show a form from the worker thread, however the form is not receiving window events and consequently nothing much happens. What do I need to do in order to get this form to respond to windows messages? Any advice people? Thanks Alastair Only change is constant unless it isn't

      C Offline
      C Offline
      Corinna John
      wrote on last edited by
      #2

      Are there any Application.DoEvents(); calls in the worker thread? Otherwise the form gets no time to process the window messages.

      A 1 Reply Last reply
      0
      • C Corinna John

        Are there any Application.DoEvents(); calls in the worker thread? Otherwise the form gets no time to process the window messages.

        A Offline
        A Offline
        Alastair Stell
        wrote on last edited by
        #3

        Ohmygod. Do I feel stupid or what? Thank you John. I have no idea what I was thinking. Anyhow of course I didn't so the poor thread couldn't service events. In partial mitigation it is 11.47pm here and I have flu. Problem solved. Thanks again! Only change is constant

        A 1 Reply Last reply
        0
        • A Alastair Stell

          Ohmygod. Do I feel stupid or what? Thank you John. I have no idea what I was thinking. Anyhow of course I didn't so the poor thread couldn't service events. In partial mitigation it is 11.47pm here and I have flu. Problem solved. Thanks again! Only change is constant

          A Offline
          A Offline
          Alastair Stell
          wrote on last edited by
          #4

          Or is that Corinna? I can never figure out first from last names... Only change is constant

          C 1 Reply Last reply
          0
          • A Alastair Stell

            Or is that Corinna? I can never figure out first from last names... Only change is constant

            C Offline
            C Offline
            Corinna John
            wrote on last edited by
            #5

            :) Corinna: First Name, usually abbreviated (Coco) John: Ugly Last Name. (One day I'll marry someone just to get a better name.)

            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