Hi Harry,
Here is some code for your reference.
private bool bChecked;
public bool MyChecked
{
set{bChecked = value;}
get{return bChecked;}
}
private void Form1_Load(object sender, System.EventArgs e)
{
this.DataBindings.Add("MyChecked",this.checkBox1,"Checked");
this.checkBox1.CheckedChanged+=new
EventHandler(checkBox1_CheckedChanged);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
this.Text = MyChecked.ToString();
}
Also here is a link you may take a look.
http://groups.google.co.jp/groups?hl...3.0404210520.2
5a73e87%40posting.google.com&rnum=5&prev=/groups%3Fhl%3Dzh-CN%26lr%3D%26q%3D
%2522checkBox1.DataBindings.Add%2522
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.