急急 vb中命令按钮的的功能设计
6个回答
展开全部
我的最简单!!
首先拉一个按钮(command1)和一个文本框(text1),然后复制以下代码:
Dim a As Integer
Private Sub Command1_Click()
If a Mod 2 = 0 Then
Text1.Text = ""
a = a + 1
Else
Text1.Text = "您要显示的内容"
a = a + 1
End If
End Sub
Private Sub Form_Load()
a = 1
End Sub
首先拉一个按钮(command1)和一个文本框(text1),然后复制以下代码:
Dim a As Integer
Private Sub Command1_Click()
If a Mod 2 = 0 Then
Text1.Text = ""
a = a + 1
Else
Text1.Text = "您要显示的内容"
a = a + 1
End If
End Sub
Private Sub Form_Load()
a = 1
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
If Command1.Tag = "insert" Then
Text1.Text = ""
Command1.Tag = "delete"
Else
Text1.Text = "你好"
Command1.Tag = "insert"
End If
End Sub
If Command1.Tag = "insert" Then
Text1.Text = ""
Command1.Tag = "delete"
Else
Text1.Text = "你好"
Command1.Tag = "insert"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
If Command1.Tag = "isPrinted" Then
Text1.Text = ""
Command1.Tag = "isDeleted"
Else
Text1.Text = "This is a TEST Message!"
Command1.Tag = "isPrinted"
End If
End Sub
If Command1.Tag = "isPrinted" Then
Text1.Text = ""
Command1.Tag = "isDeleted"
Else
Text1.Text = "This is a TEST Message!"
Command1.Tag = "isPrinted"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
If Text1.Text <> "" Then
Text1.Text = ""
Else
Text1.Text = "你好"
End If
End Sub
If Text1.Text <> "" Then
Text1.Text = ""
Else
Text1.Text = "你好"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
那请问,我要是再按第3下你希望出现什么效果?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询