VB question

Posted by hopesfall, 03-10-2010, 12:42 AM
I have a string of asterisks "*****" which are in variable1. The asterisks are there to hide the real word "doggy", which are held in variable2. When a user enters a letter into a text box, lets say "g", how can I check for the letter "g" inside my variable2 and also replace the asterisks in the corresponding spots so that it shows "**gg*" instead?

Posted by mattle, 03-10-2010, 12:24 PM
Writing a hangman game, are we? Let's break it down to the elements: 1. Capture the user input. Validate as alpha. 2. Get an array of character positions where the user-entered character matches variable2. Track whether or not the character matches at all (possibly by evaluating array size). 3. If character matches, go through position array and change the chars at each position in variable1, redraw variable1 4. If character doesn't match, increment wrong guess counter, take appropriate action. Without more specifics, it's hard to give you any more info. Is this a web page, a console app, etc.? What technologies are you using?

Kas see vastus oli kasulik?

 Prindi artikkel

Loe veel

grsec WARNING: No module mptscsi found for kernel 2.6.22.9-grsec, continuing anyway

Posted by uploadalerts, 03-27-2008, 04:46 PMHi, I see the following error, while trying to...

Sanitize issues i think

Posted by rumrunner439, 09-22-2008, 12:22 AMOk Im over having to rename everything in my computer...

/bin Directory

Posted by swurvin, 05-06-2007, 09:12 PMHello. I wonder if anyone has any ideas on how I go about...

How do I control the number of user downloading and the download speed?

Posted by celular, 09-20-2008, 11:04 PMhello, I am planning to rent a dedicated server with...

iFrame keeps opening a new windows onlick

Posted by bambinou, 11-06-2012, 11:29 AMHello, I am totally lost with this one. I have an...