I am trying to make a button disappear off the screen when the size of a list that is being filled by the user reaches a size of lets say 3 items.
The button is for "adding a new person" but once the list is full i don't want that to be an option to add another person to the list.
I have tried the following code but the program doesn't run
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
could someone please help me? the program doesn't even open.
I just want the button to go away when the number of elements in a list is greater than a specific number lets just say 3 for now
I can also include the rest of the code for my program
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…