Results 1 to 3 of 3

Thread: Displaying a second form in another thread?

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Nottingham
    Posts
    14

    Displaying a second form in another thread?

    I am trying to display a second form via another thread but it disappears immeditely. How can I get it to remain visible while the main form performs some other processing? Any help would be appreciated - thanks

  2. #2
    Lively Member
    Join Date
    Sep 2003
    Location
    Chicago, IL
    Posts
    64
    See if this works for you:

    Application.Run(new frmYourFormNameHere())

    I think this will only exist while the thread does, but that sounds like what you want anyways.
    Mike Stammer

  3. #3
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I'm just learning about threading, so take this with a grain of salt.

    Why would you want your main form to do some processing and spawn a thread to show a form? I believe the thread dies as soon as the method your thread points to ends.

    It might be a better idea to create a thread from your main thread that does the processing, and let the main thread show the other form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width