Kfkm09
asked on
Two Questions
Hi, I am making a speech recognition program in Visual Basic 6.0, and have come along two questions that are probably not very difficult to answer, but since I am a relative beginner... Well, you get the idea :-). First of all, I have an entire dictionary saved as a .TXT file in which every single line is another word. I was wondering if there was any way I could get those words into my VB program using the 'Case' operation. My second question is, how do I add on to the text in a text box instead of covering up what was just written in it with new text. For example, if I pressed a button that made a text box say "Hi", and then pressed another button that made the text box say "Hello", "Hi" would dissapear, and on would come "Hello". How could I make it say "Hi Hello" instead? Thank you in advanced!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just a minor point---> it is MUCH safer to use the String Concatenation operator & rahter than +:
Text1.Text = Text1.Text & " " & NewText
it is also MUCH better style to use the EXPLICIT property, rather than the DEFAULT property (.TEXT is the DEFAULT property of a text box). This will help if you EVER decide top upgrade to VB.NET, and in .NET, controls DO NOT HAVE DEFAULT PROPERTIES.
AW
Text1.Text = Text1.Text & " " & NewText
it is also MUCH better style to use the EXPLICIT property, rather than the DEFAULT property (.TEXT is the DEFAULT property of a text box). This will help if you EVER decide top upgrade to VB.NET, and in .NET, controls DO NOT HAVE DEFAULT PROPERTIES.
AW
:O
noted thanks :)
noted thanks :)
ASKER
So there isn't a way to get the words into Visual Basic using case? The reason I need to use this is because of the way I have written the rest of the program. I would have to change everything really.
ASKER
Thank you so much!
Text1 = Text1 + " " + NewText
or alternatively
Text1 = Text1 + chr(32) + NewText