Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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