Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

big dynamic form

Status
Not open for further replies.

arniebarnie

Programmer
Sep 26, 2003
3
NL
I made a form MainForm, that consists of multiple screens, which are all user controls.
Now, from one of the user controls i want to access a function that belongs to the MainForm.
Can anybody tell me how to do this?
 
>> Can anybody tell me how to do this?

Sure but then we would have to shoot you because of the poor design. Ever heard of the MVC (Model View Controler) Design Pattern?

[cheers]

-pete
 
arnie -

Yes, it's bad design (as Pete pointed out!). But to do this you would have to pass a copy of the instance variable of your parent form to your child control.

You'll see this in the .NET controls as the .Parent property.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top