Dear all,
I am using version 3.97d.
Basically, I have BasicLabel which requires to be hide and shown in certain condition.
I dragged Timer object into the form and put the code inside so it will continuously detect this condition.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
Dim temp As Integer = Integer.Parse(ModbusTCPCom1.Read(414940))
If temp < 0 Then
Me.FWD_Indication.Show()
Me.AFT_Indication.Hide()
ElseIf temp >= 0 Then
Me.AFT_Indication.Show()
Me.FWD_Indication.Hide()
End If
Catch ex As Exception
End Try
End Sub
However, it always returns InvalidOperationException (pls refer to attachment for details).
Is there any other solution besides using BasicLabel and put the above code using Timer?
Please advise, Thank you.
Best regards,
Andrew