I have a windows form in which I have a button1 and when that is clicked a UserControl that is added dynamically to the code is this:
I would do this with events.
Create a class that inherits from EventArgs: (I prefer VB, you can traslate)
Public Class ControlEventArgs
Inherits EventArgs
Public Property Value1 As String = String.Empty
Public Property Value2 As String = String.Empty
Public Property Value3 As String = String.Empty
Public Property Value4 As String = String.Empty
End Class
Then in your Control add the event:
Public Event ValueSubmittal As EventHandler(Of ControlEventArgs)
In your Button2_Click handler:
RaiseEvent ValueSubmittal(me, new ControlEventArgs With {.Value1=comboBox1.Text, .Value2 = comboBox2.Text, .Value3 = textBox1.Text, .Value4 = textBox2.Text}
And in your form where you dynamically create the controls you need to hook up the event handler:
AddHandler myNewControl.ValueSubmittal, AddressOf ValueSubmittalHandler
And the ValueSubmittalHandler:
Private Sub ValueSubmittalHandler(sender as Object, e As ControlEventArgs)
formControl1.Text = e.Value1
formControl2.Text = e.Value2
' etc...
End Sub