【发布时间】:2017-07-17 01:02:50
【问题描述】:
当用户填写的列表大小达到 3 个项目的大小时,我试图让一个按钮从屏幕上消失。
该按钮用于“添加新人”,但是一旦列表已满,我不希望将其作为将另一个人添加到列表中的选项。
我尝试了以下代码,但程序没有运行
Private Sub Form1_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
If inputNames.Count >= 3 Then 'inputnames is the name of the list
Button1.Visible = False 'button 1 is the add a new person button
End If
End Sub
有人可以帮我吗?该程序甚至没有打开。 当列表中的元素数量大于特定数字时,我只想让按钮消失,现在就说 3
我还可以为我的程序包含其余代码
【问题讨论】:
-
不编译?启动后直接崩溃?冻结?不跑是什么意思?将鼠标指针移到表单上后可能会直接崩溃?首次使用鼠标指针输入时,请确保
inputNames不是Nothing。
标签: vb.net visual-studio-2010 visual-studio-2012