Click here to Skip to main content
15,884,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am stucked up with the coordinated grid........plz tell me the solution
Posted
Comments
_Amy 21-Mar-13 3:30am    
Where is your code then?
jav_jojo 22-Mar-13 10:08am    
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen p = new Pen(Color.White);

g.FillRectangle(Brushes.HotPink, 30, 30, 30, 30);


for (int i = 0; i <= num_of_cells; i++) //to make a 20X20 grid
{
g.DrawLine(p, i *cell_size, 0, i *cell_size, num_of_cells *cell_size); //for horizontal lines


g.DrawLine(p, 0, i *cell_size, num_of_cells *cell_size, i *cell_size); //for vertical lines


}
g.Dispose();

}
jav_jojo 22-Mar-13 10:10am    
i am drawing grid using for loop and drawline method.........but now i don't find any way to assign coordinates to each small square of grid.
OriginalGriff 21-Mar-13 4:05am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Sandeep Mewara 21-Mar-13 14:41pm    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900