我在一个 vb 表单中有 2 个文本框。如果 txtMaterial 被填充,我想禁用 txtPackage,反之亦然。我使用下面的代码,但它不起作用。有人可以修复它吗?真的很感激。tq。
Private Sub txtMaterial_TextChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMaterial.TextChanged
txtMaterial.Enabled = True
txtPackage.Enabled = False
End Sub
Private Sub txtPackage_TextChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPackage.TextChanged
txtPackage.Enabled = True
txtMaterial.Enabled = False
End Sub