Hi,
I am developing a desktop chat application using vb.net.
My design is as follows :
1. Have a login form
2. Have a contacts form
3. Have a chat form
The chat form should be opened at runtime depending upon my chat server response. I should always listen for the response from the server and open the form.
I written a function which will listen for the response and trying a open the chat form. I am calling this function in a thread. I always get the error that i cannot open a form from the thread. I get the folloeing error.
ActiveX control '<GUID>' cannot be instantiated because the current thread is not in a single-threaded apartment.
How can i solve this.
Your help is very much required.
Thanks,
Dev.
I am developing a desktop chat application using vb.net.
My design is as follows :
1. Have a login form
2. Have a contacts form
3. Have a chat form
The chat form should be opened at runtime depending upon my chat server response. I should always listen for the response from the server and open the form.
I written a function which will listen for the response and trying a open the chat form. I am calling this function in a thread. I always get the error that i cannot open a form from the thread. I get the folloeing error.
ActiveX control '<GUID>' cannot be instantiated because the current thread is not in a single-threaded apartment.
How can i solve this.
Your help is very much required.
Thanks,
Dev.
Comment