473,569 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a keyboard

Please help i am hitting my head against a wall here.

I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.

Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.

How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.

Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
Exit Sub
Err_Letter_Z_Cl ick:
MsgBox Err.Description
Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
Exit Sub
Err_Space_Bar_C lick:
MsgBox Err.Description
Resume Exit_Space_Bar_ Click
End Sub

Once i can make the cursor appear at the end i can proceed to my next
problem.

The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.

Hope some one out there can help.

Thanks James
Jul 27 '08 #1
7 1690
"Burden" <ja**********@s onic-comms.comwrote in message
news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...
Please help i am hitting my head against a wall here.

I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.

Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.

How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.

Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
Exit Sub
Err_Letter_Z_Cl ick:
MsgBox Err.Description
Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
Exit Sub
Err_Space_Bar_C lick:
MsgBox Err.Description
Resume Exit_Space_Bar_ Click
End Sub

Once i can make the cursor appear at the end i can proceed to my next
problem.
Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.

If that doesn't fix it, try inserting:

Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

after adding to the .Text property.
>
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.
With Me!Enter_Box
.Text = Left(.Text, Len(.Text) - 1)
End With
>
Hope some one out there can help.

Thanks James

Jul 27 '08 #2
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunre albox.comwrote:
"Burden" <james.bur...@s onic-comms.comwrote in message

news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...


Please help i am hitting my head against a wall here.
I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.
Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.
How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.
Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
* *Me!Enter_Box.S etFocus
* *Me!Enter_Box.T ext = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
* *Exit Sub
Err_Letter_Z_Cl ick:
* *MsgBox Err.Description
* *Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
* *Me!Enter_Box.S etFocus
* *Me!Enter_Box.T ext = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
* *Exit Sub
Err_Space_Bar_C lick:
* *MsgBox Err.Description
* *Resume Exit_Space_Bar_ Click
End Sub
Once i can make the cursor appear at the end i can proceed to my next
problem.

Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.

If that doesn't fix it, try inserting:

Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

after adding to the .Text property.
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.

With Me!Enter_Box
* * .Text = Left(.Text, Len(.Text) - 1)
End With


Hope some one out there can help.
Thanks James- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
I have done what you said to make the cursor go to the end and it
works

Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text & "A"
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

I don't understand what you mean in the next part though. Where do i
put the code you mentioned?

James

Jul 27 '08 #3
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunre albox.comwrote:
"Burden" <james.bur...@s onic-comms.comwrote in message

news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...


Please help i am hitting my head against a wall here.
I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.
Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.
How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.
Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
* *Me!Enter_Box.S etFocus
* *Me!Enter_Box.T ext = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
* *Exit Sub
Err_Letter_Z_Cl ick:
* *MsgBox Err.Description
* *Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
* *Me!Enter_Box.S etFocus
* *Me!Enter_Box.T ext = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
* *Exit Sub
Err_Space_Bar_C lick:
* *MsgBox Err.Description
* *Resume Exit_Space_Bar_ Click
End Sub
Once i can make the cursor appear at the end i can proceed to my next
problem.

Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.

If that doesn't fix it, try inserting:

Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

after adding to the .Text property.
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.

With Me!Enter_Box
* * .Text = Left(.Text, Len(.Text) - 1)
End With


Hope some one out there can help.
Thanks James- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Also could you tell me how i insert a space.
I have tried :

Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text & " "
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

&

Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text & chr$(127)
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

&

Me!Enter_Box.Se tFocus
' Me!Enter_Box.Te xt = Enter_Box.Text & " "
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 2

Just wont add a space character. With the first one you can see the
cursor jump, but there is no space.
Jul 27 '08 #4
"Burden" <ja**********@s onic-comms.comwrote in message
news:05******** *************** ***********@w7g 2000hsa.googleg roups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunre albox.comwrote:
"Burden" <james.bur...@s onic-comms.comwrote in message

news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...


Please help i am hitting my head against a wall here.
I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.
Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.
How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.
Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
Exit Sub
Err_Letter_Z_Cl ick:
MsgBox Err.Description
Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
Exit Sub
Err_Space_Bar_C lick:
MsgBox Err.Description
Resume Exit_Space_Bar_ Click
End Sub
Once i can make the cursor appear at the end i can proceed to my next
problem.

Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.

If that doesn't fix it, try inserting:

Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

after adding to the .Text property.
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.

With Me!Enter_Box
.Text = Left(.Text, Len(.Text) - 1)
End With


Hope some one out there can help.
Thanks James- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
I have done what you said to make the cursor go to the end and it
works
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text & "A"
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

I don't understand what you mean in the next part though. Where do i
put the code you mentioned?
Put the code in the OnClick of the button you mentioned. However, a little
alteration is needed:

With Me!Enter_Box
.SetFocus
.Text = Left(.Text, Len(.Text) - 1)
End With
Jul 27 '08 #5
"Burden" <ja**********@s onic-comms.comwrote in message
news:fa******** *************** ***********@8g2 000hse.googlegr oups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunre albox.comwrote:
"Burden" <james.bur...@s onic-comms.comwrote in message

news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...


Please help i am hitting my head against a wall here.
I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.
Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.
How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.
Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
Exit Sub
Err_Letter_Z_Cl ick:
MsgBox Err.Description
Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
Exit Sub
Err_Space_Bar_C lick:
MsgBox Err.Description
Resume Exit_Space_Bar_ Click
End Sub
Once i can make the cursor appear at the end i can proceed to my next
problem.

Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.

If that doesn't fix it, try inserting:

Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1

after adding to the .Text property.
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.

With Me!Enter_Box
.Text = Left(.Text, Len(.Text) - 1)
End With


Hope some one out there can help.
Thanks James- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Also could you tell me how i insert a space.
<snip>

Have you tried Chr$(160) ?
Jul 27 '08 #6
On 27 Jul, 14:15, "Stuart McCall" <smcc...@myunre albox.comwrote:
"Burden" <james.bur...@s onic-comms.comwrote in message

news:fa******** *************** ***********@8g2 000hse.googlegr oups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunre albox.comwrote:


"Burden" <james.bur...@s onic-comms.comwrote in message
news:04******** *************** ***********@a1g 2000hsb.googleg roups.com...
Please help i am hitting my head against a wall here.
I am creating a database to use with a touchscreen and i have created
a pop up keyboard. I have got stuck on two things.
Firstly when i am hitting the keys, the letter is being added to a
text box fine but the cursor is jumping back to the beginning
everytime. When i hit the next letter it is being added to the end of
the text fine. The problem is that when i want to enter the command
space(1) into the code, i can see it add it to the text string but
when the next letter is added it is though it is not there and just
ends up in a string of letters with no space.
How can i make the code so that when i am typing it is leaving the
cursor at the end? Here is a simple part of my code for the letter Z
and the space.
Private Sub Letter_Z_Click( )
On Error GoTo Err_Letter_Z_Cl ick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + "Z"
Exit_Letter_Z_C lick:
Exit Sub
Err_Letter_Z_Cl ick:
MsgBox Err.Description
Resume Exit_Letter_Z_C lick
End Sub
Private Sub Space_Bar_Click ()
On Error GoTo Err_Space_Bar_C lick
Me!Enter_Box.Se tFocus
Me!Enter_Box.Te xt = Enter_Box.Text + space(1)
Exit_Space_Bar_ Click:
Exit Sub
Err_Space_Bar_C lick:
MsgBox Err.Description
Resume Exit_Space_Bar_ Click
End Sub
Once i can make the cursor appear at the end i can proceed to my next
problem.
Well the first thing I suggest is that you use the ampersand (&) for your
string concatentation rather than plus.
If that doesn't fix it, try inserting:
Me!Enter_Box.Se lStart = Len(Me!Enter_Bo x.Text) + 1
after adding to the .Text property.
The other problem that i have is i need to create a button that can
delete one character at a time. It is easy to create a button that can
make the field null but i don't wish to do all of it only the last
character.
With Me!Enter_Box
.Text = Left(.Text, Len(.Text) - 1)
End With
Hope some one out there can help.
Thanks James- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Also could you tell me how i insert a space.

<snip>

Have you tried Chr$(160) ?- Hide quoted text -

- Show quoted text -
Cheers mate. I thought the code was 127. Don't know where i got that
from.

Works great now. I will be coming back to you for any further problems
you know your stuff.
Jul 27 '08 #7
Works great now. I will be coming back to you for any further problems
you know your stuff.
No problem. Glad to help, anytime.

Take a look at this page:

http://www.smccall.demon.co.uk/Keyboard.htm

I think you might find some of those functions useful.
Jul 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6207
by: asdasd | last post by:
Hello there, I'm hoping someone might be able to help me out. Its been awhile since I've programmed in visual basic (and roughly at that)... I want to create a program that will allow me to choose a keyboard key (perferably an F-KEY) from a combobox and be able to set a delay (in secs) from a textbox. Once that has been chosen I need to...
1
4568
by: Jason | last post by:
so i'm loading an external web page (i.e. google.com, espn.com) into an IFRAME on top of a web application we have running in IE running on a kiosk. the kiosk is only a touch screen and has no hardware keyboard. i'm looking to create a software keyboard that can be requested by a click on our web application (a web page for all intents and...
9
2509
by: skearney | last post by:
When I was in boy scouts, as part of learning Morse code, I was told that the inventor of the typewriter originally put the letter 'e' under the left middle finger, just below its present position. The typist was often too fast and the print bars would jam. I heard the same story when I took a typing class. This led me to wonder if 't'...
7
10613
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it were a keyboard. I need to be able to identify input from the scanner and keyboard independently. I've looked at DirectX.DirectInput, and using...
2
8746
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as my keyboard. the USB keyboard is detected as HID keyboard device. the program finds the keyboard if it is attached. and I am getting valid handles....
1
4672
by: Esemi | last post by:
Hi What is the best why to create a custom keyboard shortcut (eg alt-a) on a ..Net form using C#? Thanks
16
10301
by: pukivruki | last post by:
hi, I wish to create a temporary table who's name is dynamic based on the argument. ALTER PROCEDURE . @PID1 VARCHAR(50), @PID2 VARCHAR(50), @TICKET VARCHAR(20)
331
14737
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and most versatile text editor. And, besides text editing, it also serves as a
1
2330
by: Tony Johansson | last post by:
Hello! I'm reading in a book and here they says. "Now it is time to begin thinking about which events the control should provide. Because the control is derived from userControl class, it has inherited a lot of functionality that you don't need to worry about. There are, however, a number of events that you don't want to hand to the user...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.