Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

VB 6.0 - Input Boxes


  • Please log in to reply

#1
k1lg0r1n

k1lg0r1n

    New Member

  • Member
  • Pip
  • 1 posts
the answer is probably very obvious but i dont know it. I need input from the user on my game i am making and if they click the cancel it sets the value of the input box to 0. I have tried to do If..Then.. statements to say that if the value is 0 then it will put up another input box or just sets it to another value, but that still doesnt work. I dont think there is a way to take out the cancel button but if there is that would be the best. I dont think there is another way of getting input without using text boxes, which would be too difficult in this case. so if anyone can help i would be thankful. here is my input box code.

intnumber= InputBox("Type a number between 1 and 10?", "Title")
  • 0

Advertisements


#2
Horace10

Horace10

    New Member

  • Member
  • Pip
  • 2 posts
InputBox returns a string. If Cancel is pressed, it is a zero-length string. You can test for this.

Check out http://msdn.microsof...fctinputbox.asp

If you don't want to use an InputBox, set up a frame containing a textbox (for input), a label (for the prompt) and a command button. Don't enable the command button until the contents of the text box are within the parameters you wish them to be.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP