Hi Avi,
if you want to access the value in the checkbox on one form from another
form you will have to add an accessor on the form that returns the checkbox
value to allow you to get to the value i.e.
class FormWithCheckBox : Form
{
//assume this form has a checkbox called chkBxAccepted
public bool UserAccepted
{
get
{
return chkBxAccepted.Checked;
}
}
}
Then from the other form you can do:
class FormMain : Form
{
//called when user clicks on button
private void ClickHandler()
{
FormWithCheckBox f = new FormWithCheckBox();
f.ShowDialog() // or Show if non-modal
bool userAccepted = f.UserAccepted;
//do some stuff
}
}
Hope that helps
Mark Dawson
http://www.markdawson.org
"Avi G" wrote:
Hi,
i've two forms i managed to connect with the two forms so if i press on the
first form on tools and then option the new form is rising, but the probelm
is, that i have on the new form a CheckBox that i can't see in the first form
why?
Thanks