I was wondering, when using a username login program, whether you can hide the password being entered with a character or even just a space.
I also found a program that had a whole lot of INPUT statements, but had them viewable on the screen, not popping up when the enter button is pushed. How can i do this.
All help is greatly appreciated.
Thanks
Can you use PasswordChr from VB in QBASIC?
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
Hi Bobby and welcome aboard Pete's QBasic Site's Forum,
Have a look here:
http://www.qbasicnews.com/abc/showsnipp ... snippet=46
you'll see that it's a function that does what you want, takes input from the keyboard from the users and shows them as "*" characters or any other character you want to show.
P.S.: you might want to take a look around on that link you'll notice it has alot of code examples in there about a very wide range of programming subjects. If you have trouble understanding that code example, let me know sso I can explain it to you in detail.
I hope this helps, and again, welcome aboard .
Have a look here:
http://www.qbasicnews.com/abc/showsnipp ... snippet=46
you'll see that it's a function that does what you want, takes input from the keyboard from the users and shows them as "*" characters or any other character you want to show.
P.S.: you might want to take a look around on that link you'll notice it has alot of code examples in there about a very wide range of programming subjects. If you have trouble understanding that code example, let me know sso I can explain it to you in detail.
I hope this helps, and again, welcome aboard .
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
If you are having trouble...
If you are having trouble, I whooped this up real quick:
Code: Select all
CLS
word$ = ""
DO UNTIL k$ = CHR$(13)
DO
k$ = INKEY$
LOOP UNTIL k$ <> ""
IF k$ = CHR$(8) THEN
word$ = LEFT$(word$, LEN(word$) - 1)
LOCATE 1, LEN(word$) + 1
PRINT " "
END IF
IF k$ <> CHR$(13) AND k$ <> CHR$(8) AND LEN(word$) < 10 THEN
word$ = word$ + k$
LOCATE 1, LEN(word$)
PRINT "*"
END IF
LOOP
PRINT word$
END
Thanks guys,
Does anybody have any idea about my second question? With all the input statements popping up at the same time?
What i'm trying to say is that, in a questionare i think it was, instead of have each question pop up when the enter button is pushed after the question before is answer, can all the questions be put on the screen at once?
Thanks
Does anybody have any idea about my second question? With all the input statements popping up at the same time?
What i'm trying to say is that, in a questionare i think it was, instead of have each question pop up when the enter button is pushed after the question before is answer, can all the questions be put on the screen at once?
Thanks
The easy way:
If what you want is to have the user switch between the fields as he/she wants and press a key to end, it's a bit more difficult but it can be done...
Code: Select all
locate 2,1:print "Name?";
locate3,1:print "Age?";
locate 4,1:print "Address?";
locate 5,1:print "City?";
locate 2,10:input name$
locate 3,10:input age$
locate 4,10:input address$
locate 5,10:input city$