Hi
I'm totally new and this is my first post. If i do any wrong pls forgive me :D
My problem is: First i made form2 in form1:
Form2 form2 = new Form2();
form2.show();
After that i have a checkboxlist in form2.
Now i want to get which i check in the checkboxlist will display on listbox in form1 when i click on button to close form2
ps: This is the code i did in form2
private void btnVorurStadfesta_Click(object sender, EventArgs e)
{
for (int i = 0; i < (chbVorur.Items.Count-1); i++)
{
foreach (var item in VorurList)
{
if (chbVorur.GetItemCheckState(i) == CheckState.Checked)
{
chbVorur.SetItemCheckState(i,CheckState.Indeterminate);
}
}
}
BinaryFormatter fs = new BinaryFormatter();
FileStream output = new FileStream(@"C:\Users\user\Destop\loka.dat", FileMode.Open, FileAccess.Write);
fs.Serialize(output, VorurList);
output.Close();
this.Close();
}
GaBack