Jump to content
xisto Community
Sign in to follow this  
lfc1825

How Do I Disable Text Input Control In Vb 2008? Menu Driven APP In vb 2008

Recommended Posts

Hey everyone i have to create a number guessing application using the game logic requirementsMenu: File: Exit: Exits Application Game: Start new game: Starts a new game Give me the number: Ends the current game giving the user the game number Help: Instructions: Gives the user instructions on how to play the game About: an appropriate made-up ?Software Development Company? name. It is to be menu-driven to initiate new games Game Logic: When the user chooses to ?Start new game?, the logic should generate a random integer number between (and inclusive of) 1 and 100. It is this number that the user has to guess. They do so by entering a number using the keyboard number keys directly into a text input control that accepts up to a 3 digit number (100 max) and only digit-based characters allowed. The text input control should not allow any incorrect data to be entered. When they click a ?check me? command button control, the program will tell the user if they have:1. Guessed correctly2. Guessed too high3. Guessed too low The user should be able to start a new game at any time or even ask the application to reveal the number via the ?Give me the number? menu option. If the user guesses correctly, or if they choose the ?Give me the number? menu option, the user should be asked if they wish to start a new game. If they indicate that do not want to start a new game, the text input control should become disabled until a new game is started. . i have no clue on how to do this so are there any kind souls out there who can help me please?Thanks

Share this post


Link to post
Share on other sites

This sounds like a homework assignment. I often tutor students who need help at my school in computers and some programming languages, so this is perfect. In fact, I was JUST doing that this evening with a gentleman from my school). Anyways...sounds like a fairly simple. All you need to do to disable a text field (and if you had researched it at all, you should have found it easy). It's:

txtYourTextBoxName.enabled = true

OR

txtYourTextBoxName.enabled = false

depending upon which you want it to do at the time.
Edited by Jonnyabc (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.