1
Answer

how to pass value to the function which is in another fuctio

Ask a question
i want to pass value to the function through thread... following is the original code without thread..

private void btnsearch_Click(object sender, EventArgs e)
{
SearchRecord(QuerySearch);
}

following is the code i m trying.. using thread..

private void btnsearch_Click(object sender, EventArgs e)
{
Thread Proceso1 = new Thread(new ThreadStart(load));
Proceso1.Start();

Thread Proceso2 = new Thread(new ThreadStart(loadTable ));
Proceso2.Start();

}

private void loadTable(int QuerySearch)
{

SearchRecord(QuerySearch);


}



public void load()
{

if (pictureBox1.InvokeRequired)
{
MethodInvoker assign = new MethodInvoker(load);
pictureBox1.Invoke(assign);

}
else
{
pictureBox1.Visible = true;

}
Thread.Sleep(100);
}



plz help me to pass value of querysearch through main thread to function

Answers (1)