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
Dim r As Integer
r = CInt(Me.txtRowIndex.Text)
If r > -1 Then
Return DGTimeTable.Item(4, r).Value
Code on mainform that should read this property:
Dim buffer As Byte()
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 in advance.