Thanks to all of you guys.... those suggestions were really helpful...

BTW actually what i am doing in my app is when the user click the "go" button... im creating a thread to establish the connection with the server and calling "connect" for some timeout value repeatedly...
If i dont create the thread, connect call just hangs up the application and the windows shows as "not responding" hence i created a thread to establish the connection... when established a user msg is posted to my main window... to process further on the same socket connection...!!!
After that only i read the data from the UI... That is why i dont want the user to change the inputs when the connection is being established....

Any suggestion on this... !!!

Thanks,