I am trying to make game that you have 12 random letters and with them you should make longest possible word that exist in ditionary.I want to loop through all labels and every time button is clicked each label separatly stops generating letters,when 12 label stops generating letters timer should stop.How to give same name for all labels?
You can't give all of the labels the same name and there isn't a reason you should be able to.
What I would recommend is putting all of the labels into a Panel, then loop the Panel's Items collection and do the label assignments that way. When the loop exits, you stop your Timer.
I made it like this but every time I click button it prints System.Windows.Forms.Label.Text:label2, System.Windows.Forms.Label.Text:label3 .......What is wrong???
Are you asking for how to get something out of a database, or how to take a word (string) and pull out each character (letter) to display somewhere separately, or both?
I want to select random word from SQL server database with lenght between 10 and 12,and if random selected word has lenght less than 12 add letters until lenght become 12,shuffle that word and show on this labels: imagizer.imageshack.us/a/img923/6763/8pY8JB.png
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.