Hello,
I am facing this problem:
I want to open a VB.net form using a ThreadPool with a maximum of 10 threads. I need to do this because, the form should open based on a live event and i need atmost 10 forms on the desktop at a time. If i open the form on every live event without using a ThreadPool, the desktop will be floaded with many forms.
I am using QueueUserWorkItem method of threadpool to queue a method which opens the form. In this queued method, there is form1.show() statement called. But after displaying the form, this method finishes execution and again we have 10 threads available in the system.
I somehow want to either keep this method running so that 1 thread is occupied or i want to keep the thread alive till the form1 is closed by the user.
I want the 11th form to appear on the desktop, only when any of the existing forms out of the 10 (already on desktop) is closed.
Please help me out as i am stuck at this point
Thanks & Regards,
ksmshsjs
I am facing this problem:
I want to open a VB.net form using a ThreadPool with a maximum of 10 threads. I need to do this because, the form should open based on a live event and i need atmost 10 forms on the desktop at a time. If i open the form on every live event without using a ThreadPool, the desktop will be floaded with many forms.
I am using QueueUserWorkItem method of threadpool to queue a method which opens the form. In this queued method, there is form1.show() statement called. But after displaying the form, this method finishes execution and again we have 10 threads available in the system.
I somehow want to either keep this method running so that 1 thread is occupied or i want to keep the thread alive till the form1 is closed by the user.
I want the 11th form to appear on the desktop, only when any of the existing forms out of the 10 (already on desktop) is closed.
Please help me out as i am stuck at this point
Thanks & Regards,
ksmshsjs