Jump to content
  • Advertisement
Sign in to follow this  

C# Parent Child info

This topic is 4723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a C# project with 2 forms, and one of the forms has a list viewing box. How would I be able to allow the second form to change data in the list viewing box in the first form? (My apologies for the simplicity, but I am very new to C#). -Chris

Share this post


Link to post
Share on other sites
Advertisement
I haven't done this exactly in C#, but I have done it in VB.NET, and I imagine it's very similar. If i'm wrong, i'm sure someone will post and correct me, but if i'm right, you can look into it and see =).

The child form should have a field called ParentForm or something. When the parent creates the child, the parent can set the child's parent field to itself. Then the child should be able to access whatever it needs from the parent through that field, assuming it's public.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!