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. Multi-thread form managing [modified]

Multi-thread form managing [modified]

Scheduled Pinned Locked Moved C#
questiondatabaseadobe
4 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.
  • N Offline
    N Offline
    natsuyaki
    wrote on last edited by
    #1

    I've written a plug-in architeture based application. Plugins exist in isolated assemblies and each plugin runs in it's own thread provided by the host application. But these plugins just cannot display their own forms. Exactly, they can, but it's just a "flash". How can I deal with this? Herewith the working model: All the plugins implement the interface IPlugin. The host start the plugin through the method in IPlugin with a new thread. The plugin begin its work as is required(this is where I want the plugin shows its form). The plugin trigger an event while the progress changed. When the task is done, the host will destroy the instance of the plugin. thanks in advance...

    modified on Sunday, May 11, 2008 10:57 AM

    E 1 Reply Last reply
    0
    • N natsuyaki

      I've written a plug-in architeture based application. Plugins exist in isolated assemblies and each plugin runs in it's own thread provided by the host application. But these plugins just cannot display their own forms. Exactly, they can, but it's just a "flash". How can I deal with this? Herewith the working model: All the plugins implement the interface IPlugin. The host start the plugin through the method in IPlugin with a new thread. The plugin begin its work as is required(this is where I want the plugin shows its form). The plugin trigger an event while the progress changed. When the task is done, the host will destroy the instance of the plugin. thanks in advance...

      modified on Sunday, May 11, 2008 10:57 AM

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      For a UI application to run in its own thread it probably needs a message pump and a UI thread.

      Need a C# Consultant? I'm available.
      Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

      N 1 Reply Last reply
      0
      • E Ennis Ray Lynch Jr

        For a UI application to run in its own thread it probably needs a message pump and a UI thread.

        Need a C# Consultant? I'm available.
        Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

        N Offline
        N Offline
        natsuyaki
        wrote on last edited by
        #3

        Could you please give please give more details? I'm not so good at messages.. ;P Thanks.

        N 1 Reply Last reply
        0
        • N natsuyaki

          Could you please give please give more details? I'm not so good at messages.. ;P Thanks.

          N Offline
          N Offline
          natsuyaki
          wrote on last edited by
          #4

          I solved it in a tricky way....: _CurrentPlugin.Window.ShowDialog(this); :)

          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