Hi again
In my musical project, I'm creating buttons and labels at runtime. I was wondering how can I make changes to a certain button object via a label object, like this:
Dim Label1 as New Label
Dim Button1 as New Button
Me.Controls.Add(Label1)
Me.Controls.Add(Button1)
AddHandler Label1.MouseEnter, AddressOf MousyEnter
Private Sub MousyEnter(ByVal sender As System.Object, ByVal e As System.EventArgs)
' This is what I want to do:
"Button1".Text= "What's up!"
' Can I access Button1 within Me.Controls?
End Sub
I cannot seem to figure this out. Any suggestions please let me know!
Thanks!!!
In my musical project, I'm creating buttons and labels at runtime. I was wondering how can I make changes to a certain button object via a label object, like this:
Dim Label1 as New Label
Dim Button1 as New Button
Me.Controls.Add(Label1)
Me.Controls.Add(Button1)
AddHandler Label1.MouseEnter, AddressOf MousyEnter
Private Sub MousyEnter(ByVal sender As System.Object, ByVal e As System.EventArgs)
' This is what I want to do:
"Button1".Text= "What's up!"
' Can I access Button1 within Me.Controls?
End Sub
I cannot seem to figure this out. Any suggestions please let me know!
Thanks!!!
Last edited: