Results 1 to 3 of 3

Thread: Threading?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Auckland, NZ
    Posts
    182

    Threading?

    In a project with several forms, when some data in one form was changed it is necessary to update another form. Se when the first form closes, the form #2 makes visible and reads some data from a database. For couple of seconds the form window not fully repainted until all data was read. I think that I need to put the process of reading the data from a database into a separate thread, while the second form state changes to visible. So far I have never used threading, so I would appreciate any advice how to implement it.

    Thanks

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    It's pretty easy. My advise would be in the constructor, after the initialize call, create a new thread and let that get the data. This free's your form to paint itself and such.

    Here is a link to maybe get you started:
    http://msdn.microsoft.com/library/de...eThreading.asp

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Auckland, NZ
    Posts
    182
    Thanks for the link, hellswraith.

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