Hello,
From inside a thread I wanna enable/disable a text box on my form, that's so easy to do, but my problem is that I have to enable it only if a radio button is checked, and if not checked I should not enable it.
Here is my code:
From within my thread I use Me.SetEnable(True/False) but it won't work at one condition.
Please help me
From inside a thread I wanna enable/disable a text box on my form, that's so easy to do, but my problem is that I have to enable it only if a radio button is checked, and if not checked I should not enable it.
Here is my code:
Visual Basic:
Delegate Sub SetEnabledCallback(ByVal Enabled As Boolean)
Private Sub SetEnabled(ByVal Enabled As Boolean)
If Me.RadioButton1.InvokeRequired Then
Dim d As New SetEnabledCallback(AddressOf SetEnabled)
Me.Invoke(d, New Object() {Enabled})
Else
Me.TextBox1.Enabled = Me.RadioButton1.Checked
End If
End Sub
Please help me