So as in Java it is:
boton[x].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
I would like to know how it is done but in Visual Basic
So as in Java it is:
boton[x].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
I would like to know how it is done but in Visual Basic
Look Alexis, to set an event in the programmed way you will need to use a Handler
For example:
I defined a new button and its properties (text, width, height, position and event) in the constructor. You must create a method to define the action to be performed when the button is clicked. When you have already defined it, you simply add a handler , next to the method that the button will use when it is clicked:
And that's it:
In your case, as it is an array of buttons... you would have to define its properties using a for loop. (obviously)