S
Stu
Hi guys,
I have gone through google and tried different ideas for the past 4 hours
now and am getting nowhere.
I currently have a class that raises an event, from this event I want to add
a value to a listbox on form1.
However I cannot access the listbox on form1. I need to make a reference to
the object (so VS tells me), the following line works but not for what I
want (am new so bear with me),
Form1 fm = new Form1();
I know this creates a new instance of a form (which I dont want) I want to
access the already running form, I have a property on the form that will set
the value for me, I'm trying to access that property, the only way I can do
that is to make it static (comes up in intellisense) and make a reference to
it which takes me to the Form1 fm = new Form1(); :/
Is this the wrong way to go about this?
Any pointers in the right direction is much appreciated.
Thanks
Stu
I have gone through google and tried different ideas for the past 4 hours
now and am getting nowhere.
I currently have a class that raises an event, from this event I want to add
a value to a listbox on form1.
However I cannot access the listbox on form1. I need to make a reference to
the object (so VS tells me), the following line works but not for what I
want (am new so bear with me),
Form1 fm = new Form1();
I know this creates a new instance of a form (which I dont want) I want to
access the already running form, I have a property on the form that will set
the value for me, I'm trying to access that property, the only way I can do
that is to make it static (comes up in intellisense) and make a reference to
it which takes me to the Form1 fm = new Form1(); :/
Is this the wrong way to go about this?
Any pointers in the right direction is much appreciated.
Thanks
Stu