OOP Question

awdigrigoli

Member
Joined
Mar 30, 2005
Messages
12
Programming Experience
5-10
Hello,

The scenario: I have a MainForm that will house several other forms. E.g. Store, Survey, User, etc. What I want to do is open the Survey form, perform some actions, and then move to the Store form using Alt+2. Pressing Alt+2 will perform a Save on Survey and then open the Store form with variables passed from the Survey just entered.

The Question: How do I call methods of a calling class(MainForm) from an instantiated class(Survey)?

Thank you,Anthony
 
You say that your MainForm will "house" several other forms. Does this mean you are using MDI? If so, you can access MainForm through the Survey.MdiParent property. Otherwise, you might try passing a reference to MainForm to the Survey constructor.
 
Back
Top