Results 1 to 5 of 5

Thread: newb question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    3

    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!

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    3

    Re: newb question

    Thanks alot!

    Great help

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    3

    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?

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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
  •  



Click Here to Expand Forum to Full Width