ybbun
Electrical
- Jul 1, 2003
- 3
I have a hangman program which involves 2 forms. The first form sets the options (such as the word to guess). These variables are public and are used for the 2nd form, where the guessing of letters takes place. Code must be executed on the 2nd form before the guessing can commence (i.e. printing the ? characters for each letter of the word, etc). This is fine the first time the program is run as the code can be put into the Form_Load procedure. However, when the word is guessed, I need it to go back to the form with options, where the word is changed (achieved by hiding and showing the forms). Then going back to the 2nd form, the code in Form_Load is not run. I need this code to run each time the program runs. I need to find out how to either:
- Close a form so the Form_Load procedure can be rerun; or
- Find a way of running code on a form when it is loaded in a different way, such as Show.Form
Any help is appreciated.
- Close a form so the Form_Load procedure can be rerun; or
- Find a way of running code on a form when it is loaded in a different way, such as Show.Form
Any help is appreciated.