Grid creation

Requeroth

New member
Joined
Jul 26, 2004
Messages
3
hi.. how do i go about making a grid on a picturebox, say a 10x10 grid, adding each grid into a 2d array(im not so familiar with 2d arrays) so that each square will respond to a mouse event on click
 
You dont really need to store the information in an array. Just draw the lines and calculate the box they click in the PictureBoxs Click event.
 
hmm alright, so how do i draw a 10x10 grid on a picture box? but i will eventually have to utilize 2d array to store each grid because im using the grid as a game board
 
i tried
PictureBox1.CreateGraphics.DrawRectangle(pen, 1, 1, 200, 200)

didnt seem to work, the rectangle didnt turn up
 
Back
Top