Having taken the plunge to
update from VB4 to Visual Basic.NET, I'm having trouble with some syntax.
Specifically, I used to use the Keypress event to send a Tab when the Enter
key was pressed:
Private Sub txthead1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
I would like to do this in Visual Basic.NET but can't for the life of me
work out how to do this! Any advice would be very gratefully received.
I'm also having a problem getting a text box to hightlight its contents when
it gets the focus - in VB4 is used to use:
Private Sub txthead1_GotFocus()
txthead1.SelStart = 0
txthead1.SelLength = Trim(Len(txthead1.Text))
End Sub
However it seems that this too has changed (and the VB6 converter tool isn't
a lot of help to me, as I can't yet understand what half of its suggestions
mean!).
Many thanks in advance for any advice.