Hi all, I have project about send a recieve file in LAN network between 2 PC, code of progressbar in server run good and code of progressbar recieve file in client program I have write but when debug it don't notify fail but it don't run. Please fix it for me
Code in client program I have add some line and function below that I have mark // in behind code:
public delegate void Updatepgdstatus(int s, int p);//
pgbStatus.Value = 0;//
lblProgressbar.Text = "";//
int progress = 0;//
int size = len;//
progress += len;//
set2(size, progress);//
set3(progress.ToString() + " Byte of " + size + " Byte");//
void set3(string s)//
{
if (InvokeRequired)
{
object[] pList = { s };
lblProgressbar.BeginInvoke(new UpdateListBoxCallBack(OnUpdateLabel1), pList); }
else
{
OnUpdateLabel1(s);
}
}
private void OnUpdateLabel1(String s)//
{
lblProgressbar.Text = s;
}
void set2(int s, int p)//
{
if (InvokeRequired)
{
object[] pList = { s, p };
pgbStatus.BeginInvoke(new Updatepgdstatus(OnUpdatepgdstatus), pList);
}
else
{
OnUpdatepgdstatus(s, p);
}
}
private void OnUpdatepgdstatus(int s, int p)//
{
pgbStatus.Maximum = s; pgbStatus.Value = p;
}
Code of project here:
http://www.mediafire.com/?ly8vnecsyis6jtl
Help me fix and make a progressbar recieve in client recieve
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Maria Bili22 pointsPosted Dec 11, 2012, 3:37 AM EST
Here is project client original.
http://www.mediafire.com/?s64fz6l8f093275
Maria Bili22 pointsPosted Dec 14, 2012, 5:23 AM EST
Maria Bili22 pointsPosted Dec 15, 2012, 4:51 PM EST
http://www.mediafire.com/download.php?do06c6yw2g4c38a
and here is Client code.
http://www.mediafire.com/download.php?s64fz6l8f093275
Please help me.
Maria Bili22 pointsPosted Dec 16, 2012, 9:53 PM EST