Hi,
I have two forms. there is a listBox in form1 and I need to add to this listBox from FORM2.
It is not too hard, but I may need to add an item to another form's listBox.
I mean maybe I will have a third form witch contains a listBox and I must add the item form FORM2 into that listBox.
I hope I could explain curefully.
Please Help
Thanks
Loading
JasonPosted Jul 28, 2009, 11:42 AM
Program
{
public static Form1 f1;
public static Form2 f2;
public static Form3 f3;
public static Form4 f4;
}
and then assign those values on form load
Form1
{
OnFormLoad()
{
Program.f1 = this;
}
}
You can then access the form members across the whole application. This opens you up to threading issues though, so beware.
H GhasemiPosted Jul 27, 2009, 10:08 AM
jasonPosted Jul 26, 2009, 9:50 PM