I have a small inconvenience, it turns out that in a VB TextBox I have to write a 15-digit key, but within that string, the first 2 vary, the 6 that follow is the same information in all the chains, the ninth digit must be equal to the second, followed by two zeros (00) and hence the last 4 digits are variable.
Within the event KeyDown
of the TextBox I identify a ENTER
after writing the first 2 digits, what fails me is to COPY the 2nd digit to the ninth position.
Annex code to see if you can guide me.
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
TextBox1.AppendText("243810_00")
End If
End Sub
The underscore should be replaced by the second digit of the textBox that has been entered. I hope to give me to understand.
Update
Examples: If I write in the text box:
- 18 must autocomplete with 1
8
2438108
00 - 12 must autocomplete with 1
2
2438102
00 - 20 must autocomplete with 2
0
2438100
00