Advertisement
Guest User

prak3grid

a guest
Dec 17th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Pen blackPen = new Pen(Color.Black, 1);
  2. Rectangle rect = new Rectangle(0, 0, panel1.Width -1, panel1.Height -1);
  3. e.Graphics.DrawRectangle(blackPen, rect);
  4.  
  5. // int PointY = panel1.Height / 6;
  6.  
  7. for (int i = 1; i < 7; i++)
  8. {
  9. int GridWith = panel1.Width / 6;
  10. GridWith = GridWith * i;
  11. e.Graphics.DrawLine(blackPen, GridWith, 0, GridWith, panel1.Height);
  12.  
  13.  
  14. }
  15. for (int i = 0; i < 7; i++)
  16. {
  17. int GridHeight = panel1.Height / 6;
  18. GridHeight = GridHeight * i;
  19. e.Graphics.DrawLine(blackPen, 0, GridHeight, panel1.Width, GridHeight);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement