Click here to Skip to main content
15,891,652 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to make a very simplistic game in c# windows application.
I want to be able to communicate between controls and form1. Back and forward. The controls, i want to be little menus, with personalized settings that CAN affect the main form1 content. Or, from form1 to affect the content from a control.
-
for example: I imagine, those controls are like pages from a website. The form1 is like the main page with the main menu. From that form1 main menu, i open those pages(controls), make some changes inside them, and inside form1 stuff is updated. And if I change something in form1, when I open a control, it will contain the change.
-
How to do it? What is the best approach that you can think? Or what is the official approach ? I want a simple and elegant solution. So, be elegant.
Thank you.

What I have tried:

i tried a lot of stuff in more than 15 years of c#.
Posted
Updated 18-Sep-18 19:47pm
v6

1 solution

See these:
Transferring information between two forms, Part 1: Parent to Child[^]
Transferring information between two forms, Part 2: Child to Parent[^]
They talk about forms, but it's exactly the same for controls, and form / control communications. (A Form is a Control, but a specialised one - it's derived from it.)
 
Share this answer
 
Comments
_Q12_ 19-Sep-18 2:21am    
Thank you, OriginalGriff.
OriginalGriff 19-Sep-18 3:39am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900