vb 两个文本框 一个按钮,实现以下功能
2个回答
展开全部
Private Sub Text1_Change()
If Text1.Text = "" Or Text2.Text = ""坦告如肢 Then
Command1.Visible = False
Else: Command1.Visible = True
End If
End Sub
Private Sub Text2_Change()
If Text1.Text = "让橡明" Or Text2.Text = "" Then
Command1.Visible = False
Else: Command1.Visible = True
End If
End Sub
If Text1.Text = "" Or Text2.Text = ""坦告如肢 Then
Command1.Visible = False
Else: Command1.Visible = True
End If
End Sub
Private Sub Text2_Change()
If Text1.Text = "让橡明" Or Text2.Text = "" Then
Command1.Visible = False
Else: Command1.Visible = True
End If
End Sub
展开全部
VS2010 VB.NET已测试通过:
Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Visible = False
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Or TextBox2.Text = "" Then
Button1.Visible = False
Else : Button1.Visible = True
End If
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
If TextBox2.Text = "" Or TextBox2.Text = "" Then
Button1.Visible = False
Else : Button1.Visible = True
End If
End Sub
Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Visible = False
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Or TextBox2.Text = "" Then
Button1.Visible = False
Else : Button1.Visible = True
End If
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
If TextBox2.Text = "" Or TextBox2.Text = "" Then
Button1.Visible = False
Else : Button1.Visible = True
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询