0
I want to check if a checkbox has been selected in a form, because I am working with several forms.
Using the following code, :
frmPrincipal f = new frmPrincipal();
if (f.chkNotificacao.Checked == true)
{
f.notifyIcon1.ShowBalloonTip(1000, "Notificação",
"Um novo usuário foi cadastrado.", ToolTipIcon.Info);
}
If I put it this way to test, :
frmPrincipal f = new frmPrincipal();
f.chkNotificacao.Checked = true;
if (f.chkNotificacao.Checked == true)
{
f.notifyIcon1.ShowBalloonTip(1000, "Notificação",
"Um novo usuário foi cadastrado.", ToolTipIcon.Info);
}
Is there any other way to check a checkbox from another form ? Because I need to check it.
If a new user is created it will check whether this checkbox has been selected,to trigger a notification.