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. Window as seperate thread.

Window as seperate thread.

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

    I want to open a child window on a seperate thread, from a parent window. The code in parent window should execute seperately and the code in child window should execute seperately. I tried it using multithreading but couldn't do it. I was able to execute functions as seperate thread but not entire window. I hope this can be done.

    Errors are like Mini Skirts, shorter they get, more revealing they become.

    L 1 Reply Last reply
    0
    • V vaseeem

      I want to open a child window on a seperate thread, from a parent window. The code in parent window should execute seperately and the code in child window should execute seperately. I tried it using multithreading but couldn't do it. I was able to execute functions as seperate thread but not entire window. I hope this can be done.

      Errors are like Mini Skirts, shorter they get, more revealing they become.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Can't be done. All Windows, Forms, Controls must be created and manipulated by the main thread only; if you need additional threads, they should not touch the Controls, instead they should use the Control.InvokeRequired/Invoke pattern to tell the main thread to read or write Control properties and call Control methods in their behalf. Anything else is bound to fail, either immediately, or at some later time, with often mysterious phenomena such as disappearing menu bars, windows "Not responding" and much more. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Fixturized forever. :confused:


      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