To have a responsive UI, you must use another thread.
But if you use visual studio, the generated client class have asynchronous method signatures wich would do it for you. If your method is
"GetData", then you should have a method called "GetDataAsync" wich would not freeze your window.
Here is an example :
WsClient client;
protected override void Load() {
base.Onload();
client = new WsClient();
client.GetDataCompleted += new GetDataCompletedEventHandler(client_GetDataCompleted);
}
//here is the call
protected void Invoke()
{
client.GetDataAsync(txtSearch.Text);
}
//here is the result
void client_GetDataCompleted(object sender, GetDataCompletedEventArgs e)
{
//display the result
txtResult.Text = e.Result;
}