StrikeEagleII
Technical User
I have a plain text box on a form that the users can enter multiple lines of text into. I've done some searching around and it appears that you can't use the tab key to insert a tab into the field unless you use a rich text box (hassle--i was hoping you can change it's behavior like you can the enter key). To sort of simulate that, I use the keydown event of the text box to intercept the tab and cancel it and instead use sendkeys to insert four spaces:
Private Sub txtTOLSummary_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 And Shift = 0 Then
KeyCode = 0
SendKeys " "
End If
End Sub
That appears to work. However I am told that in windows 7 Sendkeys will be disabled and that it should not be included in code. Is there another way to do this?
Thanks,
J
Private Sub txtTOLSummary_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 And Shift = 0 Then
KeyCode = 0
SendKeys " "
End If
End Sub
That appears to work. However I am told that in windows 7 Sendkeys will be disabled and that it should not be included in code. Is there another way to do this?
Thanks,
J