private void InvokeGridViewAddRows(String str)
{
if (this.InvokeRequired)
{
GridViewAddRows addRows = new GridViewAddRows((InvokeGridViewAddRows));
this.Invoke(addRows, str);
}
else
{
// 在這裡寫入原本取到str後要對dataGridView做的事
}
}
--
我的問題是在 CellClick
程式調整:
Private Sub DGridV_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGridV.CellClick
Try
If Me.InvokeRequired Then '加這一行即可防止整個form當掉
If e.ColumnIndex = 0 Then
沒有留言:
張貼留言