Results 1 to 4 of 4

Thread: [RESOLVED] [02/03] Multithreading a Form

  1. #1

    Thread Starter
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Resolved [RESOLVED] [02/03] Multithreading a Form

    What I want to do is create a ThreadPool and assign that pool of thread to a specific form. I don’t know if this is possible, but any help would be greatly appreciated. Even if you can’t give me specifics, I point in the right direction would help.

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Multithreading a Form

    Like any other object, a ThreadPool is available anywhere you have a reference to it. If you create one within a form and assign it to a private variable then it's not accessible from outside the form. If you create one outside a form you can pass it in by assigning it to a property or passing it to a method argument. It is still accessible from outside the form though, as long as you have a reference to it outside the form. This is all true of any object, not just ThreadPools.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: [02/03] Multithreading a Form

    Quote Originally Posted by jmcilhinney
    Like any other object, a ThreadPool is available anywhere you have a reference to it. If you create one within a form and assign it to a private variable then it's not accessible from outside the form. If you create one outside a form you can pass it in by assigning it to a property or passing it to a method argument. It is still accessible from outside the form though, as long as you have a reference to it outside the form. This is all true of any object, not just ThreadPools.
    Thanks for the info jmc...I feel really dumb for overlooking the obvious answer . Just 1 more quick question; how many threads are in a Threadpool?

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [02/03] Multithreading a Form

    Quote Originally Posted by ProphetBeal
    Thanks for the info jmc...I feel really dumb for overlooking the obvious answer . Just 1 more quick question; how many threads are in a Threadpool?
    I think you can find your answer here
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

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