How to access the property of a child usercontrol form in c# or vb.net
Hello,
I have a windows form with a panel wich include a usercontrol form.
Now i have to run some code on the main (parent) form, that checks the value of a property on the child form(usercontrol in panel).
I have created a public readonly property on the usercontrol, but when i try to read this i can't get the value.
I also get the error message "Conversion from string "" to type 'Integer' is not valid." on line If uc.rl1 = True.
Property on usercontrol:
Public ReadOnly Property rl1() As Boolean Get Dim r As Integer r = CInt(Me.txtRowIndex.Text) If r > -1 Then Return DGTimeTable.Item(4, r).Value Else Return False End If End Get End Property
Dim buffer As Byte() ReDim buffer(2) Dim uc As ucTestform = New ucTestform uc = Me.ucPanel.Controls.Find("ucTestform", False)(0) If uc.rl1 = True Then buffer(0) = buffer(0) Or 128 Else buffer(0) = buffer(0) And 127
Thanks a lot both of you.
Regards,
Edward