I want to allow the user to tell me how many rows and columns of buttons to draw. Then draw the buttons. When a button is clicked, it displays the row # and column # of that button in a msgbox.
I would create a button using the following code:
Button myText = new Button();
myText.Location = new Point(25,35);
myText.Text = "First";
this.Controls.Add (myText);
First of all, how would I create a click event if the button name isn't available until runtime? If a button is created in the design view, to get the click event one would double-click on the button.
Would I need a 2d array to store the column/row numbers to retrieve. But how would I know which button is clicked to retrieve the info?
Thanks.