I have a simple button which will open up the AddStation form (this button is placed on the MainForm form):
var AddStation = new AddStation();
AddStation.Show();
It shows the form fine, however the form AddStation has a save button. When this button is pressed the AddStation form is closed, but I want to run a method which is in the MainForm's class (to update a listbox which is present on MainForm).
This isn't possible the way I do it right now, since the form AddStation doesn't have a reference to the MainForm, but how will I do this? How can I run the method MainForm.UpdateListBox from the AddStation form?
 
     
     
     
    