Enc Rypt

Enc Rypt

  • NA
  • 10
  • 0

How to read property of external form

Oct 18 2009 12:24 PM
Hello, well basically, i created a windows form application when i started my project and i have created two extra forms (options and about).  The options tab has a few checkbox's like: minimize to tray and top-most program and in my main form i have the code:

 if (this.WindowState == FormWindowState.Minimized == true)
{
notifyIcon1.Visible = true;
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
}

but i want to do something like

 if (this.WindowState == FormWindowState.Minimized == true && Options.checkBox1.Checked == true)
{
notifyIcon1.Visible = true;
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
}
but i can't find a way to read the properties of the controls on form3(Options), i tried changing the controls in the designer code portion of the form from private to public, but still no success.  I would really appreciate any help on this topic. Thanks in advance.

Answers (7)