Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How Do I Disable Text Input Control In Vb 2008?


3 replies to this topic

#1 lfc1825

    Newbie

  • Kontributors
  • Pip
  • 2 posts

Posted 17 March 2010 - 08:42 PM

Hey everyone i have to create a number guessing application using the game logic requirements
Menu:
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 correctly
2. Guessed too high
3. 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

#2 Jonnyabc

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 125 posts
  • Gender:Male
  • Location:Indianapolis, IN
  • myCENT:18.37

Posted 18 March 2010 - 12:34 AM

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, 18 March 2010 - 12:36 AM.


#3 lfc1825

    Newbie

  • Kontributors
  • Pip
  • 2 posts

Posted 19 March 2010 - 11:52 AM

hey thats great and everything seems to be ok..just wanted to ask what the code would be for it to tell me the answer so it gives the user the answer?

thanks alot

#4 jono75

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 16 April 2010 - 09:14 PM

thanks i have been looking for this




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users