|
-
Jun 28th, 2011, 08:54 AM
#1
Thread Starter
New Member
newb question
Hey guys
New to programming completely, but been reading some books and having a muck around on VB 10 Express.
Im in the process of creating a keypad which I can punch in numbers 1- 9 to enter a password. I have 9 buttons for the numbers. I've got the keys to print the numbers into the textbox above but when I press a second key it replaces the first number in the text box.
My question is, how do I make the numbers go in sequence, so instead of
(Press 1) - 1 -
(Press 2) - 2 - (clears 1)
I want it to go like
(Press 1) - 1 -
(Press 2) - 12 -
and so on...
Coulden't find this anywhere else.
Cheers guys!
-
Jun 28th, 2011, 09:04 AM
#2
Re: newb question
You need to concatenate the strings:
Textbox.Text = "1"
Textbox.Text = Textbox.Text & "2" 'That would work, but you can also write it as:
Textbox.Text &= "2"
My usual boring signature: Nothing
 
-
Jun 28th, 2011, 09:12 AM
#3
Thread Starter
New Member
Re: newb question
Thanks alot!
Great help
-
Jun 28th, 2011, 09:24 AM
#4
Thread Starter
New Member
Re: newb question
One more question.
When I input a number it displays as a number in the textbox. How can I make it change to a * when im typing it out?
-
Jun 28th, 2011, 09:30 AM
#5
Re: newb question
The textbox has a password character property: UseSystemPasswordChar.
Setting that to True may be sufficient.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|