Greetings.
I can't find the option to make a rich text box hide the password (using William's transparent Rich Text box tutorial. Thanks).
Am I blind or it doesn't exist? Should I get a font with * to hide the password?
FirZen
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
If it doesn't have a passwordcharacter field, just print it to screen or use a label, and make a quick sub to replace all the character with *'s.
That's what I do on NR.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Why do you want to use a RTB? To make it transparent? If so, thats the only reason.
And you will have to program the password chars, store what you type in a variable and show the * from the Len() of the text etc..
I think MS uses RTB by default so you can change the colors. I've never checked or even tried to change the colors of a normal text box, so I'm not sure.
I really need to install VB on here again.. /sigh
The fact is, the rich text box is invisible, the GUI itself has the borders.
This is more of a looks question.
In text I understand what you mean. In code, no idea. I'll look into it.
Store whats typed in a VAR. Instead of sending the actual value of the textbox, when pressing OK/Login, send the variable?
And replace every character in the text box for wildcards?
The Call MenuState(MENU_STATE_LOGIN) refers to a sub in the Server's project, right? I'll have to look in the server and edit stuff there?
Lets see if I get the var/change part:
My way of showign code:
On txtPassword change:
varINPUT = txtPassword.Caption
Right?
But if I change the letters to * while doing this, won't the variable save *?
FirZen
Dragoons Master
Unregistered
Use OnKeyPress method, but make sure you handle with backspace and delete.
That would record the last key pressed, not the caption...
How does that work?
Enter and Backspace are handled differently?
I do not have the MSDN, so I don't know how to work with OnKeyPress. Can you hint me out?
FirZen
Dragoons Master
Unregistered
OnKeyPress gives you the ascii character of the letter, just add that to the variable and change the caption to len(variable) times *
I see.
Can Len() be used as a var or do I need to store it as a var first?
No problems with Backspace or do I need extra attention on that one?
As you can see, never coded in VB.
FirZen
Dragoons Master
Unregistered
Len() is a function, like in any other language, it return the value, so yes, it can be used as a variable, no need to store. And for the back space, you'll need to make an If statement and remove the last letter. Use Mid and Len functions together, if you don't know this function, google it ^^
Its a Rich Text box.
FirZen
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
He wants a transparent textbox so the GUI shows through.
I don't know what wrong with just printing the text or using a label and replacing the string with the same amount of *'s.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
you mean, showing the actual password? Dunno...
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Robin Wrote:replacing the string with the same amount of *'s.
No. I mean creating your own password character replacer :roll:
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Won't that mess with the info sending?
No sig for 3 posts. You're lucky.
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
-sigh- You're going to store the password somewhere else, and then fill the textbox with *'s.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
yes I had that idea... Still working on it
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
William Wrote:Why do you want to use a RTB? To make it transparent? If so, thats the only reason.
And you will have to program the password chars, store what you type in a variable and show the * from the Len() of the text etc..
Actually, William had that idea when you were still fumbling around with controls.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
its not the first time I code. Just the first time I do it in VB.
Already did some stuff with Pascal, GML (that's not even a coding language, is it?), C-Script...
C++ I think. But that was waaaaay too back.
So, I had that idea in my mind, just din't know how to put it into code. I was hoping someone came up with the same idea, but with better coding skills.
Eh, screw this. Nobody can play my game surrounded by people. Period.
Um, if you use the RTB control, in the properties, isn't there a "Password Character" part where you set what key will show instead of what you type? O_o
Visual Basic Service Pack 6
Maybe the RTB has a password field in SP6.
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Matt, that's only a normal Textbox.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Oh. I don't have VB installed, or I'd have just checked myself.
Doesn't Rez have this in his Zombie game?
|