473,508 Members | 2,053 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_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
Exit Sub
Err_Letter_Z_Click:
MsgBox Err.Description
Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
Exit Sub
Err_Space_Bar_Click:
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 1685
"Burden" <ja**********@sonic-comms.comwrote in message
news:04**********************************@a1g2000h sb.googlegroups.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_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
Exit Sub
Err_Letter_Z_Click:
MsgBox Err.Description
Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
Exit Sub
Err_Space_Bar_Click:
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.SelStart = Len(Me!Enter_Box.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...@myunrealbox.comwrote:
"Burden" <james.bur...@sonic-comms.comwrote in message

news:04**********************************@a1g2000h sb.googlegroups.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_Click
* *Me!Enter_Box.SetFocus
* *Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
* *Exit Sub
Err_Letter_Z_Click:
* *MsgBox Err.Description
* *Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
* *Me!Enter_Box.SetFocus
* *Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
* *Exit Sub
Err_Space_Bar_Click:
* *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.SelStart = Len(Me!Enter_Box.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.SetFocus
Me!Enter_Box.Text = Enter_Box.Text & "A"
Me!Enter_Box.SelStart = Len(Me!Enter_Box.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...@myunrealbox.comwrote:
"Burden" <james.bur...@sonic-comms.comwrote in message

news:04**********************************@a1g2000h sb.googlegroups.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_Click
* *Me!Enter_Box.SetFocus
* *Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
* *Exit Sub
Err_Letter_Z_Click:
* *MsgBox Err.Description
* *Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
* *Me!Enter_Box.SetFocus
* *Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
* *Exit Sub
Err_Space_Bar_Click:
* *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.SelStart = Len(Me!Enter_Box.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.SetFocus
Me!Enter_Box.Text = Enter_Box.Text & " "
Me!Enter_Box.SelStart = Len(Me!Enter_Box.Text) + 1

&

Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text & chr$(127)
Me!Enter_Box.SelStart = Len(Me!Enter_Box.Text) + 1

&

Me!Enter_Box.SetFocus
' Me!Enter_Box.Text = Enter_Box.Text & " "
Me!Enter_Box.SelStart = Len(Me!Enter_Box.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**********@sonic-comms.comwrote in message
news:05**********************************@w7g2000h sa.googlegroups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"Burden" <james.bur...@sonic-comms.comwrote in message

news:04**********************************@a1g2000h sb.googlegroups.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_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
Exit Sub
Err_Letter_Z_Click:
MsgBox Err.Description
Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
Exit Sub
Err_Space_Bar_Click:
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.SelStart = Len(Me!Enter_Box.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.SetFocus
Me!Enter_Box.Text = Enter_Box.Text & "A"
Me!Enter_Box.SelStart = Len(Me!Enter_Box.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**********@sonic-comms.comwrote in message
news:fa**********************************@8g2000hs e.googlegroups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"Burden" <james.bur...@sonic-comms.comwrote in message

news:04**********************************@a1g2000h sb.googlegroups.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_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
Exit Sub
Err_Letter_Z_Click:
MsgBox Err.Description
Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
Exit Sub
Err_Space_Bar_Click:
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.SelStart = Len(Me!Enter_Box.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...@myunrealbox.comwrote:
"Burden" <james.bur...@sonic-comms.comwrote in message

news:fa**********************************@8g2000hs e.googlegroups.com...
On 27 Jul, 13:32, "Stuart McCall" <smcc...@myunrealbox.comwrote:


"Burden" <james.bur...@sonic-comms.comwrote in message
news:04**********************************@a1g2000h sb.googlegroups.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_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + "Z"
Exit_Letter_Z_Click:
Exit Sub
Err_Letter_Z_Click:
MsgBox Err.Description
Resume Exit_Letter_Z_Click
End Sub
Private Sub Space_Bar_Click()
On Error GoTo Err_Space_Bar_Click
Me!Enter_Box.SetFocus
Me!Enter_Box.Text = Enter_Box.Text + space(1)
Exit_Space_Bar_Click:
Exit Sub
Err_Space_Bar_Click:
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.SelStart = Len(Me!Enter_Box.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
6202
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...
1
4564
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...
9
2504
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....
7
10599
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...
2
8739
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...
1
4668
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
10296
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
14679
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...
1
2318
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...
0
7225
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,...
0
7124
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...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
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...
0
7498
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...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3195
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...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.