Test box questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

1. I want to set up a text box so that when the user presses the space bar a
dot character appears in the text box. (Yes, I know it's not an original
idea.) What is the easiest way of accessing and filtering the input from the
keyboard to achieve this?

2. In many editor programmes you can use the Insert key to switch between
Insert and Overwrite modes of text entry, but my text boxes don't seem to
recognise this key. Is there some parameter I need to set in a text box so
that it will switch from Insert to Overwrite?

Grateful for any help.
 
simonc said:
1. I want to set up a text box so that when the user presses the space bar a
dot character appears in the text box. (Yes, I know it's not an original
idea.) What is the easiest way of accessing and filtering the input from the
keyboard to achieve this?

Watch each key in the Keydown event and change them as needed.

If e.KeyCode = 32 Then
e.Handled = True
RichTextBox1.SelectedText = "."
End If

2. In many editor programmes you can use the Insert key to switch between
Insert and Overwrite modes of text entry, but my text boxes don't seem to
recognise this key. Is there some parameter I need to set in a text box so
that it will switch from Insert to Overwrite?

A RichTextBox handles this automatically....

LFS
 
Thank you for the e.keycode routine. But this seems to put a space character
as well as a dot into the textbox.

Do you have to clear some sort of keyboard buffer as well?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top