Hi all,
I tried searching for my problem but i fear my keywords and problem is to generic. Apologies if this has been answered before.
OK, so I'm coding a Windows Forms app using C# in VS2008. It one of my first few applications and I'm struggling calling methods contained in my main form parent with the name main. I simply want a button click in a child form to execute a method in the parent. I' cant seem to do this .
Here is a method in my main.cs for demonstration purposes. (main.cs is instantiated from the default program.cs created by VS2008 using Application.Run(new main()); )
public void test()
{
MessageBox.Show("test called");
}
My problem is that from a child form I can't seem to go main.test(). I'm guessing its because main isnt the instance, its the class. How would i go about getting a handle on main?
Thanks you for your time
Kez