سلام
میدونم که بازم کسی توجه نمی کنه، ولی بازم وظیفه خودم دونستم تا جایی که خودم پیش رفتم اینجا بذارم تا دوستانی که تا این حد مشکل شون مرتفع میشه، استفاده کنند.

تو کد زیر از روش delegate و Callback استفاده کردم و با اینکه هیچ سوادی تو #C ندارم تونستم اینطوری (با استفاده از msdn و بر پایه سواد دلفی!) جواب بگیرم. دوستان اگه مشکلی تو کد من می بینن، خیلی خوشحال میشم که رفع اشکال کنند تا دوستان دیگه هم بعداً (با دیدن این کد) به اشتباه نیفتن ...



// This delegate enables asynchronous calls for adding
// the text property into a ListBox control.
delegate void AddTextCallback(string text);

// This method is passed in to the AddTextCallBack delegate
// to add the Text property of lstboxLogs.
private void AddText(string text)
{
this.lstboxLogs.Items.Add(text);
}

// lstboxLogs = Is a ListBox to log events.
private void addLog(object log)
{
string msg = string.Format("{0:F} > {1}", DateTime.Now, log);

// Check if this method is running on a different thread
// than the thread that created the control.
if (this.lstboxLogs.InvokeRequired)
{
// It's on a different thread, so use Invoke.
AddTextCallback d = new AddTextCallback(AddText);
this.Invoke
(d, new object[] { msg + " (From Thread)" });
}
else
{
// It's on the same thread, no need for Invoke
AddText(msg);
}
}

// This delegate enables asynchronous calls for setting
// the Dataset property to a DataGridView control.
delegate void Update_dataGVCallback(DataTable table);

// This method is passed in to the Update_dataGVCallback delegate
// to set the DataTable property to dataGV.
private void Update_dataGV(DataTable table)
{
if (this.dataGV.InvokeRequired)
{
Update_dataGVCallback d = new Update_dataGVCallback(Update_dataGV);
this.Invoke
(d, new object[] {table});
}
else
{
this.dataGV.DataSource = table;
this.dataGV.AutoResizeColumns();
this.Refresh();
}
}

// cbTablesName = A ComboBox contain Table(s) name
// GetHotBillTableContents = A WebMethod return Dataset by TableName
// dataGV = A DataGridView for show Dataset contains.
private void update_sql_tables()
{
for (int idx = 0; idx < cbTablesName.Items.Count - 1; idx++)
{
addLog("Fetch Table <" + cbTablesName.Items[idx].ToString() + "> Contents ...");
DataSet setting_ds = hotbill.GetHotBillTableContents(cbTablesName.Items[idx].ToString());
addLog(string.Format("Table <{0}> have [{1}] records.",
cbTablesName.Items[idx].ToString(),
setting_ds.Tables[0].Rows.Count));
if (setting_ds.Tables.Count > 0)
{
Update_dataGV(setting_ds.Tables[0]);
Thread.Sleep(1000); // replace with a retardation procedur ...
}
}
}

private void btnUpdateSettings_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure to update all tables?", "Warning",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1) == DialogResult.Yes)
{
btnGetTables_Click(sender, e);

addLog(string.Format("{0} <{1}> {2}", "Start update", cbTablesName.Items.Count, "Tables"));
Thread th = new Thread(new ThreadStart(update_sql_tables));
th.IsBackground = true;
th.Start();
//update_sql_tables(); // I want do this function in thread, and also log steps ...
}
}


فعلاً با همین کار من راه افتاد ولی چیزی که من میخواستم استفاده از BackgroundWorker برای رفع مشکل مطرح شده بود که اساتید هر موقع وقت کردند، ممنون میشم که یه راهنمایی بفرمایند ...