For example, I would like to make the BackColor
of one of the panels of form 2
red but I want to do it from another form using a button.
Asked
Active
Viewed 35 times
-1

gdam
- 23
- 4
-
Hi, show us what you have got – Stefan Aug 27 '18 at 16:26
-
You need a reference to the existing form. Then a public modifier for the control or a form property that can access it. – LarsTech Aug 27 '18 at 16:27
-
1Consult [Passing Data Between WinForms](https://stackoverflow.com/questions/17032484/). – Dour High Arch Aug 27 '18 at 16:28
1 Answers
0
I think you should try this https://stackoverflow.com/a/17047470/4571435
Assume FirstChildForm as Form 1 and SecondChildForm as Form 2. Add button to FirstChildForm and Panel on the SecondChildForm.

Murtuza Ali Khan Mohammed
- 479
- 1
- 5
- 18