hi all,
i am working webservices.
when i call the webservice it can take more than 5minutes to read the data from webservices. that time little bit irritating. So i want to showing the .gif image that time iam did that but it's not working.
let me know how can i do this.
in my code (windows forms)
1) iam taking grid
2) another form have progressbar control
3) when i call the webservice anotherform is showing
4) when i complete the webservice calling another form is closing
this is not working for me
in my code
when ever i debug the binddata calling otherwise not calling i don't know what's going on
so let me know where i wrong is there another way to do this
public partial class Form12 : Form
{
Test_Service Testsrvc = new Test_Service();
Test[] test;
private Thread th;
private Form5 objFrm5 = new Form5();
public Form12()
{
InitializeComponent();
Load += new EventHandler(Form12_Load);
}
private void ShowDialog()
{
if (this.InvokeRequired)
{
objFrm5.ShowDialog();
}
else
{
th = new System.Threading.Thread(Binddata);
th.IsBackground = true;
th.Start();
}
}
void Form12_Load(object sender, EventArgs e)
{
ShowDialog();
if (th != null)
{
th.Abort();
objFrm5.Close();
}
}
private void Binddata()
{
Testsrvc.Credentials = new System.Net.NetworkCredential("UserName", "Pwd");
test = Testsrvc.ReadMultiple(null, null, 0);
dataGridView1.DataSource = Test;
pictureBox1.Visible = false;
progressBar1.Visible = false;
}
}