Hello,
I am trying to type something in a combobox and when I press for example ALT+a I would like a symbol like "ø" to be inserted at cursor position.
I tried this:
Private Sub ComboBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.Alt And e.KeyCode = 65 Then
ComboBox1.Text = "test"
End If
End Sub
but it doesn't seem to do anything.
So, 2 questions.
1. How can I detect the combination of keys pressed.
2. Is there a function to detect cursor position and insert the text or do I have to create the string myself?
Thx
I am trying to type something in a combobox and when I press for example ALT+a I would like a symbol like "ø" to be inserted at cursor position.
I tried this:
Private Sub ComboBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.Alt And e.KeyCode = 65 Then
ComboBox1.Text = "test"
End If
End Sub
but it doesn't seem to do anything.
So, 2 questions.
1. How can I detect the combination of keys pressed.
2. Is there a function to detect cursor position and insert the text or do I have to create the string myself?
Thx