OK. The major problem here is that you aren't keeping a reference to either form when you create them - so you only ever get to "find" the form again when you get an event and can access it via the
sender
parameter to the event handler.
Plus, there is the fun that because you use Show to display each form, you can easily get multiple versions of the same form open at once - so which one are you supposed to update? And from which version of the other form?
You are handling this the wrong way: your ListViewForm and QuestionForm should have no idea that the MainForm (or each other) actual exist, they should report back to the parent Mainform via events which then uses properties and methods on the children to update them.
So, assuming that you want to limit the children to one instance showing each:
1) Create a class level private ListViewForm and QuestionForm reference variable, and set them both to
null
.
2) When you are supposed to show an instance of the form, check the variable. If it's not null, the form is already visible, and you need do nothing (but you might set the focus to it). If it isn't, create a new instance, set the variable, and add a handler for the FormClosing event.
2) When the closing event occurs, set the variable to
null
.
Now add an event to the QuestionForm, which is handled in the MainForm that indicates that there is new data - add a property (or a method) to fetch the new data.
In the MainForm handler, fetch the new data, and pass it to the ListViewForm for it to update itself.
That probably sounds complicated, but it isn't, not really - it's very obvious once you get your head round it.
Have a look at this:
Transferring information between two forms, Part 3: Child to Child[
^] - it includes an example.