Connect between two forms

G

Guest

Hi,

i've two forms one called form1 and form2, i've a checkbox1 on form2 and i
want that when checkbox1 on form2 checked so when minimize form1 it will hide
to the sys tray, i know all the codes for hiding to the sys tray but i can't
see the checkbox in form2 when i edit form1 that say like that

private void project_name_Form_Resize(object sender, EventArgs e)
{

if (checkbox1.Checked == true)
if (WindowState == FormWindowState.Minimized)


{

Hide();

}

now what is the code that i must enter so i can see the checkbox in form2,
Plz dont send me to google i already been there and i can't understant how to
do that maybe you can explian where i need to put the right codes.
 
S

Scully

Hi,

perhaps you can use a global variable of type Boolean that would
represent the state of the CheckBox you need. In this case, your IF
statement would be:


if(IsCheckedCheckBox1==true)


Hope this helps.

Scully.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top