thanks for help but it didnt work out for me bcoz i just want to know which button is selected from 8x8 grid which is possible by knowing the values of i, j in grid and after that i can apply oprations on i,j for further actions
so i want to know how i will get a value of i,j in function abc. please read the code carefully.
i wanna know how i can return the name of image of the button
The .Image property doesn't contain a name, but it does have a .Tag property. You can use this property when assigning the image to the button to hold a string, which you can then use to get this data, just like you did with the coordinates on the button itself. You could also keep an internal list of images with an assosiated name (a custom image class of sorts). When you assign the image to the buttons, use a reference to the image in this list rather than a 'new' image. Then you can search this list for an identical reference to the .Image property of the button, and get the associated name that way. The first method is propably easier though...