0
私は私の子フォーム上の子フォームを使用して親フォームの変数値を変更する方法は?
int count;
private void timer1_Tick(object sender, EventArgs e)
{
counter.Text = "TOTAL: "+Convert.ToString(count);
time.Text = DateTime.Now.ToString("h:mm:ss tt");
date.Text = DateTime.Now.ToString("MMMM d, yyyy");
}
を持っている私の親フォーム上で、私は
int counter;
public void view()
{
//codes//codes//codes//
counter = pview.Rows.Count;
}
を持っている私は、カウント=カウンタを設定したい... 私は
count = childform.counter;
を試みたが、それは動作しませんでした..
私を助けてください。助けます。 -Lina Inverse
が、私はそれを考え出しました!最後に! 私はちょうど int countを変更します。 〜 public static int count; と私の子供の書式で parent.count = counter; –