Hi All, I have created Command Array like follows.
So.. I want to get each and every command button name when I press One of command button.
Ex:
If I press NewButton8 then I need msgbox with it's name, text (All of command button properties if possible). Button Name is very important
Thank You very much,
Regards,
Supun Silva
Code:
Public Class Form1
Dim NewButton(25) As Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim loc As Integer
loc = 50
For i = 1 To 25
NewButton(i) = New Button()
NewButton(i).Text = "Hello " & i
Me.Controls.Add(NewButton(i))
NewButton(i).Location = New Point(10, loc)
NewButton(i).Name = "NewButton" & i
loc = loc + 20
Next
End Sub
Ex:
If I press NewButton8 then I need msgbox with it's name, text (All of command button properties if possible). Button Name is very important
Thank You very much,
Regards,
Supun Silva
Comment