VB 2005 control array

Status
Not open for further replies.

kashthealien

Beta member
Messages
1
how can I shorten the following code effectively provided I have buttons 3 to 6 in a collection named group

Private Sub button3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.MouseHover
button3.visible =false
End Sub
Private Sub button4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.MouseHover
button4.visible =false
End Sub
Private Sub button5_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.MouseHover
button5.visible =false
End Sub
Private Sub button6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.MouseHover
button6.visible =false
End Sub:confused::confused::confused:
 
Thought I would respond, but I don't have anything I can say other than I haven't worked with arrays hardly at all. I think once actually, in class. I had an intro VB course, and we only slightly touched on that, as the focus of the course was to give an overview of what VB can do.

To add, I am problably the last person to give you advice on reduced code writing, I always wrote way more code than other classmates LOL. We had to do a Fibonacci series thing in class and I had about 3 times the code that I needed. hahaha

Sorry I couldn't help but good luck.
 
Status
Not open for further replies.
Back
Top Bottom