Guest User

Untitled

a guest
Jan 22nd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public void MakeLabels()
  2. {
  3. word = GetRandomWord();
  4. char[] chars = word.ToCharArray();
  5. int between = 330 / chars.Length;
  6. for (int i = 0; i < chars.Length; i++)
  7. {
  8. labels.Add(new Label());
  9. labels[i].Location = new Point((i * between) + 10, 80);
  10. labels[i].Text = "_";
  11. labels[i].Parent = groupBox1;
  12. labels[i].BringToFront();
  13. labels[i].CreateControl();
  14. }
  15. }
  16.  
  17. for (int i = 0; i < chars.Length; i++)
  18. {
  19. labels.Add(new Label());
  20. labels[i].Location = new Point((i * between) + 10, 80);
  21. if(i!=0)labels[i].Text = "_";
  22. labels[i].Parent = groupBox1;
  23. labels[i].BringToFront();
  24. labels[i].CreateControl();
  25. }
Add Comment
Please, Sign In to add comment