-
March 20th, 2011, 04:04 PM
#1
Virtual Keyboard
Hey everyone, this may seem a little bit of a hard problem for a beginer like myelf, but I am hoping someone cn give me a hand with it.
I have eated a windows form that has a virtual keyboard and a box above it. What ideally I want to do is to press the keys and the corressponding letters then appear in this box above the keys. I then need to be able to link this into another form which contains a text box. This textbox should hold the text which was created by the button presses in the other form.
My apoligies if that isn't as clear as youd like but if anyone thinks they could help but need a better explaination just let me know
thanks!
-
March 20th, 2011, 11:10 PM
#2
Re: Virtual Keyboard
I think you have explained the issue sufficiently. I just don't see what the problem is. Ain't the "box above" the virtual keyboard a TextBox too? In that case you just need to copy the Text property from one TextBox to the other one. In order to do this the two forms need to reference each other in some way. The best way to accomplish this depends on the context that I don't know.
So if the above doesn't help you we actually do need some more information on what you are trying to do.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
March 21st, 2011, 04:56 AM
#3
Re: Virtual Keyboard
I tried making the box above a text box but t was not going to be a large enough box, as this is going to spoof a car infotainment system I need things to be bigger, so I have instead just used a box, giving me the freedom to make it larger. So this is where the problem lies, I have tried to actually output text to boxes on other parts of my system but have been unable to so far. What the input from the virtual keyboard is going to be is the web address for a website of your choosing, as my system will not actually have access to a keyboard.
-
March 21st, 2011, 07:22 AM
#4
Re: Virtual Keyboard
There's no contraint on the size of a text box if you only set its Multiline property to true. (The Windows Notepad application, for instance, essentially isn't more than a single text box plus some helper code.) You can also have the text box use any font and colors you choose. But that's about all the text box can do. For instance, you can't format the text inside to make only part of it bold.
If you still can't use a text box (and that looks likely to me from the description of your app) I would suggest to set up a String variable to keep track of the text that was entered. You can then pass that wherever you want. If your custom box is a class you have defined, it looks reasonable to keep that variable internal to this class and expose it as some sort of Text property.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
March 23rd, 2011, 11:21 AM
#5
Re: Virtual Keyboard
I have now managed to get it as a text box, and when a button is pressed the correct letter appears, now my problem is how do I manage to keep the letters on the screen that have already been input by the button presses? My guess is I need to create a string that keeps a track of them all but in all honesty I am at a loss at exactly how to do that.
-
March 23rd, 2011, 04:30 PM
#6
Re: Virtual Keyboard
No, you don't need to create such a string, the text box already has it: the Text property. You'd just need to append new characters using the operator += instead of assigning them with =.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
March 24th, 2011, 12:16 PM
#7
Re: Virtual Keyboard
Thanks Eri! That was so simple honestly thought I had to create a string, but thanks. Now all I need is to return this value to the previous textbox in the web browser
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
|